summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-02 00:25:59 +0000
committerJunio C Hamano <gitster@pobox.com>2018-05-02 13:59:52 +0900
commit939b89a0832810981da1f0a696d36d89c16c36bd (patch)
tree274e0eabd0b78486c1af74b67a83e558a3308bda /submodule.c
parent7a915b4b743d13e57f2a65494f19055617fd4406 (diff)
downloadgit-939b89a0832810981da1f0a696d36d89c16c36bd.tar.gz
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>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/submodule.c b/submodule.c
index 9a50168b23..ee7eea4877 100644
--- a/submodule.c
+++ b/submodule.c
@@ -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;