summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-02 00:26:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-02 04:59:53 (GMT)
commit57911a31feae8d2cb065afa502b872235d43358e (patch)
treec1d4e02c73043e316775eb03ba1683405d63eea7 /sequencer.c
parenta0554934364f3c8921abb8f7526301e81c230dac (diff)
downloadgit-57911a31feae8d2cb065afa502b872235d43358e.zip
git-57911a31feae8d2cb065afa502b872235d43358e.tar.gz
git-57911a31feae8d2cb065afa502b872235d43358e.tar.bz2
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 1ccc778..94b6513 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1119,7 +1119,7 @@ static int try_to_commit(struct strbuf *msg, const char *author,
if (!(flags & ALLOW_EMPTY) && !oidcmp(current_head ?
&current_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;
}