summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-24 05:07:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-24 05:07:54 (GMT)
commit5000cd45d80c6789a36e33e70c462ccf1d128dcb (patch)
tree8c1edb950075c6a5e1dd90f82ef6e9b782e48ab3 /submodule.c
parentd2617eb98440a43072c49e416e0986ef3231faa4 (diff)
parent731eb176a30da4a7f268482be0067f159791dd4f (diff)
downloadgit-5000cd45d80c6789a36e33e70c462ccf1d128dcb.zip
git-5000cd45d80c6789a36e33e70c462ccf1d128dcb.tar.gz
git-5000cd45d80c6789a36e33e70c462ccf1d128dcb.tar.bz2
Merge branch 'sb/checkout-recurse-submodules'
Code cleanup. * sb/checkout-recurse-submodules: submodule: remove a superfluous second check for the "new" variable
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c
index 5615d73..d3299e2 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1474,8 +1474,7 @@ int submodule_move_head(const char *path,
cp1.no_stdin = 1;
cp1.dir = path;
- argv_array_pushl(&cp1.args, "update-ref", "HEAD",
- new ? new : EMPTY_TREE_SHA1_HEX, NULL);
+ argv_array_pushl(&cp1.args, "update-ref", "HEAD", new, NULL);
if (run_command(&cp1)) {
ret = -1;