Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-02 03:26:06 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-02 07:59:53 +0300
commitba2df7519afa4606fb97e1e83be41342b40bc451 (patch)
tree503997b4624622309504d482d2ceaa73af92fa78 /dir.c
parent57911a31feae8d2cb065afa502b872235d43358e (diff)
dir: use the_hash_algo for empty blob object ID
To ensure that we are hash algorithm agnostic, use the_hash_algo to look up the object ID for the empty blob instead of using the empty_tree_oid variable. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 06f4c4a8bf..e879c34c2e 100644
--- a/dir.c
+++ b/dir.c
@@ -828,7 +828,7 @@ static int add_excludes(const char *fname, const char *base, int baselen,
if (size == 0) {
if (oid_stat) {
fill_stat_data(&oid_stat->stat, &st);
- oidcpy(&oid_stat->oid, &empty_blob_oid);
+ oidcpy(&oid_stat->oid, the_hash_algo->empty_blob);
oid_stat->valid = 1;
}
close(fd);