sequencer: use the_hash_algo for empty tree object ID

To ensure that we are hash algorithm agnostic, use the_hash_algo to look up the object ID for the empty tree 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 57911a31feae8d2cb065afa502b872235d43358e
1 file changed +1 -1
sequencer.c
+1 -1
@@ -1119,7 +1119,7 @@ static int try_to_commit(struct strbuf *msg, const char *author,
1119
1120 if (!(flags & ALLOW_EMPTY) && !oidcmp(current_head ?
1121 &current_head->tree->object.oid :
1122 - &empty_tree_oid, &tree)) {
1122 + the_hash_algo->empty_tree, &tree)) {
1123 res = 1; /* run 'git commit' to display error message */
1124 goto out;
1125 }