mirror of
https://github.com/git/git.git
synced 2024-11-25 02:44:48 +08:00
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>
This commit is contained in:
parent
a055493436
commit
57911a31fe
@ -1119,7 +1119,7 @@ static int try_to_commit(struct strbuf *msg, const char *author,
|
||||
|
||||
if (!(flags & ALLOW_EMPTY) && !oidcmp(current_head ?
|
||||
¤t_head->tree->object.oid :
|
||||
&empty_tree_oid, &tree)) {
|
||||
the_hash_algo->empty_tree, &tree)) {
|
||||
res = 1; /* run 'git commit' to display error message */
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user