summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2017-04-17 07:59:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-18 00:41:13 (GMT)
commit731eb176a30da4a7f268482be0067f159791dd4f (patch)
tree5684a88f667e2a83d6f95574c70ff56c12cf450d /submodule.c
parent25804914fa3661549cb4017fd0d127b9b626fc69 (diff)
downloadgit-731eb176a30da4a7f268482be0067f159791dd4f.zip
git-731eb176a30da4a7f268482be0067f159791dd4f.tar.gz
git-731eb176a30da4a7f268482be0067f159791dd4f.tar.bz2
submodule: remove a superfluous second check for the "new" variable
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 6e8825b..eed2148 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1362,8 +1362,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;