]> git.ipfire.org Git - thirdparty/git.git/commitdiff
builtin/receive-pack: convert one use of EMPTY_TREE_SHA1_HEX
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:26:01 +0000 (00:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:52 +0000 (13:59 +0900)
Convert one use of EMPTY_TREE_SHA1_HEX to use empty_tree_oid_hex to
avoid a dependency on a given hash algorithm.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c

index 5f35596c1475cc611753b5ef4e6db29292809694..dca523f50fed19b3732a3ed828ebff7b056ab2de 100644 (file)
@@ -968,7 +968,7 @@ static const char *push_to_deploy(unsigned char *sha1,
                return "Working directory has unstaged changes";
 
        /* diff-index with either HEAD or an empty tree */
-       diff_index[4] = head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX;
+       diff_index[4] = head_has_history() ? "HEAD" : empty_tree_oid_hex();
 
        child_process_init(&child);
        child.argv = diff_index;