Skip to content

Commit 1f88828

Browse files
chooglengitster
authored andcommitted
branch: rework comments for future developers
For two cases in which we do not explicitly pass --track=<choice> option down to the submodule--helper subprocess, we have comments that say "we do not have to pass --track", but in fact we not just do not have to, but it would be incorrect to pass any --track option to the subprocess (instead, the correct behaviour is to let the subprocess figure out what is the appropriate tracking mode to use). Signed-off-by: Glen Choo <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dda3114 commit 1f88828

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

branch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,9 @@ static int submodule_create_branch(struct repository *r,
549549
strvec_push(&child.args, "--track=inherit");
550550
break;
551551
case BRANCH_TRACK_UNSPECIFIED:
552-
/* Default for "git checkout". No need to pass --track. */
552+
/* Default for "git checkout". Do not pass --track. */
553553
case BRANCH_TRACK_REMOTE:
554-
/* Default for "git branch". No need to pass --track. */
554+
/* Default for "git branch". Do not pass --track. */
555555
break;
556556
}
557557

0 commit comments

Comments
 (0)