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 <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Glen Choo committed Mar 31, 2022 at 15:41 UTC 1f888282e2914283890f61000a7589d32b4132bc
1 file changed +2 -2
branch.c
+2 -2
@@ -549,9 +549,9 @@ static int submodule_create_branch(struct repository *r,
549 strvec_push(&child.args, "--track=inherit");
550 break;
551 case BRANCH_TRACK_UNSPECIFIED:
552 - /* Default for "git checkout". No need to pass --track. */
552 + /* Default for "git checkout". Do not pass --track. */
553 case BRANCH_TRACK_REMOTE:
554 - /* Default for "git branch". No need to pass --track. */
554 + /* Default for "git branch". Do not pass --track. */
555 break;
556 }
557