From: Sebastian Schuberth Date: Mon, 17 Apr 2017 07:59:47 GMT Subject: [PATCH] submodule: remove a superfluous second check for the "new" variable Message-ID: <0102015b7aecbf67-2f63e58b-5f75-4c9b-975f-e8e35176d510-000000@eu-west-1.amazonses.com> Signed-off-by: Sebastian Schuberth --- submodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/submodule.c b/submodule.c index c52d663..68623bd 100644 --- a/submodule.c +++ b/submodule.c @@ -1396,8 +1396,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; -- https://github.com/git/git/pull/345