Skip to content

Commit 57911a3

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ static int try_to_commit(struct strbuf *msg, const char *author,
11191119

11201120
if (!(flags & ALLOW_EMPTY) && !oidcmp(current_head ?
11211121
&current_head->tree->object.oid :
1122-
&empty_tree_oid, &tree)) {
1122+
the_hash_algo->empty_tree, &tree)) {
11231123
res = 1; /* run 'git commit' to display error message */
11241124
goto out;
11251125
}

0 commit comments

Comments
 (0)