Skip to content

Commit c00866a

Browse files
bk2204gitster
authored andcommitted
builtin/receive-pack: convert one use of EMPTY_TREE_SHA1_HEX
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f2e5119 commit c00866a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/receive-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ static const char *push_to_deploy(unsigned char *sha1,
968968
return "Working directory has unstaged changes";
969969

970970
/* diff-index with either HEAD or an empty tree */
971-
diff_index[4] = head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX;
971+
diff_index[4] = head_has_history() ? "HEAD" : empty_tree_oid_hex();
972972

973973
child_process_init(&child);
974974
child.argv = diff_index;

0 commit comments

Comments
 (0)