summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:10 (GMT)
commit42c8ce1c49f862c98b35e4d89c88aa3d489d6608 (patch)
treedce3eb119c51e3d539f5a703411787d3a333b175 /submodule.c
parent3d241297991c6f6ac6b1e50e52a4ae35bc431f28 (diff)
parent7882fa220c1f86e3f9707270e2e94d54149394ed (diff)
downloadgit-42c8ce1c49f862c98b35e4d89c88aa3d489d6608.zip
git-42c8ce1c49f862c98b35e4d89c88aa3d489d6608.tar.gz
git-42c8ce1c49f862c98b35e4d89c88aa3d489d6608.tar.bz2
Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (42 commits) merge-one-file: compute empty blob object ID add--interactive: compute the empty tree value Update shell scripts to compute empty tree object ID sha1_file: only expose empty object constants through git_hash_algo dir: use the_hash_algo for empty blob object ID sequencer: use the_hash_algo for empty tree object ID cache-tree: use is_empty_tree_oid sha1_file: convert cached object code to struct object_id builtin/reset: convert use of EMPTY_TREE_SHA1_BIN builtin/receive-pack: convert one use of EMPTY_TREE_SHA1_HEX wt-status: convert two uses of EMPTY_TREE_SHA1_HEX submodule: convert several uses of EMPTY_TREE_SHA1_HEX sequencer: convert one use of EMPTY_TREE_SHA1_HEX merge: convert empty tree constant to the_hash_algo builtin/merge: switch tree functions to use object_id builtin/am: convert uses of EMPTY_TREE_SHA1_BIN to the_hash_algo sha1-file: add functions for hex empty tree and blob OIDs builtin/receive-pack: avoid hard-coded constants for push certs diff: specify abbreviation size in terms of the_hash_algo upload-pack: replace use of several hard-coded constants ...
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 eb08cf0..1f88623 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1569,7 +1569,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");
@@ -1661,9 +1661,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;