Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Choo <chooglen@google.com>2022-04-01 01:41:17 +0300
committerJunio C Hamano <gitster@pobox.com>2022-04-01 01:52:51 +0300
commit1f888282e2914283890f61000a7589d32b4132bc (patch)
treeca2312745eb0798d99f0b0691fff399740e04b74 /branch.c
parentdda31145d79cc2408c248611013dfb0ad05e9636 (diff)
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>
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/branch.c b/branch.c
index ed6f993aa6..8ee9f43539 100644
--- a/branch.c
+++ b/branch.c
@@ -549,9 +549,9 @@ static int submodule_create_branch(struct repository *r,
strvec_push(&child.args, "--track=inherit");
break;
case BRANCH_TRACK_UNSPECIFIED:
- /* Default for "git checkout". No need to pass --track. */
+ /* Default for "git checkout". Do not pass --track. */
case BRANCH_TRACK_REMOTE:
- /* Default for "git branch". No need to pass --track. */
+ /* Default for "git branch". Do not pass --track. */
break;
}