Skip to content

Commit ba2df75

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 57911a3 commit ba2df75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ static int add_excludes(const char *fname, const char *base, int baselen,
828828
if (size == 0) {
829829
if (oid_stat) {
830830
fill_stat_data(&oid_stat->stat, &st);
831-
oidcpy(&oid_stat->oid, &empty_blob_oid);
831+
oidcpy(&oid_stat->oid, the_hash_algo->empty_blob);
832832
oid_stat->valid = 1;
833833
}
834834
close(fd);

0 commit comments

Comments
 (0)