From: brian m. carlson Date: Mon, 23 Apr 2018 23:39:46 GMT Subject: [PATCH 36/41] sequencer: use the_hash_algo for empty tree object ID Message-ID: <20180423233951.276447-37-sandals@crustytoothpaste.net> In-Reply-To: <20180423233951.276447-1-sandals@crustytoothpaste.net> 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 --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index b879593486..12c1e1cdbb 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 ? ¤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; }