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>

brian m. carlson committed May 2, 2018 at 00:26 UTC ba2df7519afa4606fb97e1e83be41342b40bc451
1 file changed +1 -1
dir.c
+1 -1
@@ -828,7 +828,7 @@ static int add_excludes(const char *fname, const char *base, int baselen,
828 if (size == 0) {
829 if (oid_stat) {
830 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);
832 oid_stat->valid = 1;
833 }
834 close(fd);