Skip to content

Commit 939b89a

Browse files
bk2204gitster
authored andcommitted
submodule: convert several uses of EMPTY_TREE_SHA1_HEX
Convert several uses 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 7a915b4 commit 939b89a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

submodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ static void submodule_reset_index(const char *path)
15671567
get_super_prefix_or_empty(), path);
15681568
argv_array_pushl(&cp.args, "read-tree", "-u", "--reset", NULL);
15691569

1570-
argv_array_push(&cp.args, EMPTY_TREE_SHA1_HEX);
1570+
argv_array_push(&cp.args, empty_tree_oid_hex());
15711571

15721572
if (run_command(&cp))
15731573
die("could not reset submodule index");
@@ -1659,9 +1659,9 @@ int submodule_move_head(const char *path,
16591659
argv_array_push(&cp.args, "-m");
16601660

16611661
if (!(flags & SUBMODULE_MOVE_HEAD_FORCE))
1662-
argv_array_push(&cp.args, old_head ? old_head : EMPTY_TREE_SHA1_HEX);
1662+
argv_array_push(&cp.args, old_head ? old_head : empty_tree_oid_hex());
16631663

1664-
argv_array_push(&cp.args, new_head ? new_head : EMPTY_TREE_SHA1_HEX);
1664+
argv_array_push(&cp.args, new_head ? new_head : empty_tree_oid_hex());
16651665

16661666
if (run_command(&cp)) {
16671667
ret = -1;

0 commit comments

Comments
 (0)