Skip to content

Commit 5000cd4

Browse files
committed
Merge branch 'sb/checkout-recurse-submodules'
Code cleanup. * sb/checkout-recurse-submodules: submodule: remove a superfluous second check for the "new" variable
2 parents d2617eb + 731eb17 commit 5000cd4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

submodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,8 +1474,7 @@ int submodule_move_head(const char *path,
14741474
cp1.no_stdin = 1;
14751475
cp1.dir = path;
14761476

1477-
argv_array_pushl(&cp1.args, "update-ref", "HEAD",
1478-
new ? new : EMPTY_TREE_SHA1_HEX, NULL);
1477+
argv_array_pushl(&cp1.args, "update-ref", "HEAD", new, NULL);
14791478

14801479
if (run_command(&cp1)) {
14811480
ret = -1;

0 commit comments

Comments
 (0)