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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
brian m. carlson 2018-05-02 00:25:59 +00:00 committed by Junio C Hamano
parent 7a915b4b74
commit 939b89a083
1 changed files with 3 additions and 3 deletions

View File

@ -1567,7 +1567,7 @@ static void submodule_reset_index(const char *path)
get_super_prefix_or_empty(), path);
argv_array_pushl(&cp.args, "read-tree", "-u", "--reset", NULL);

argv_array_push(&cp.args, EMPTY_TREE_SHA1_HEX);
argv_array_push(&cp.args, empty_tree_oid_hex());

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

if (!(flags & SUBMODULE_MOVE_HEAD_FORCE))
argv_array_push(&cp.args, old_head ? old_head : EMPTY_TREE_SHA1_HEX);
argv_array_push(&cp.args, old_head ? old_head : empty_tree_oid_hex());

argv_array_push(&cp.args, new_head ? new_head : EMPTY_TREE_SHA1_HEX);
argv_array_push(&cp.args, new_head ? new_head : empty_tree_oid_hex());

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