From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Glen Choo <chooglen@google.com>
Subject: [PATCH 1/2] branch: rework comments for future developers
Date: Thu, 31 Mar 2022 15:41:17 -0700 [thread overview]
Message-ID: <20220331224118.3014407-1-gitster@pobox.com> (raw)
In-Reply-To: <xmqq7d89zqys.fsf@gitster.g>
From: Glen Choo <chooglen@google.com>
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>
---
branch.c | 4 ++--
1 file 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;
}
--
2.35.1-917-g7c4048624a
next prev parent reply other threads:[~2022-03-31 22:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 20:01 [PATCH 0/4] branch --recurse-submodules: Bug fixes and clean ups Glen Choo via GitGitGadget
2022-03-29 20:01 ` [PATCH 1/4] branch: support more tracking modes when recursing Glen Choo via GitGitGadget
2022-03-30 21:13 ` Junio C Hamano
2022-03-30 23:29 ` Glen Choo
2022-03-29 20:01 ` [PATCH 2/4] branch: give submodule updating advice before exit Glen Choo via GitGitGadget
2022-03-30 21:15 ` Junio C Hamano
2022-03-29 20:01 ` [PATCH 3/4] branch --set-upstream-to: be consistent when advising Glen Choo via GitGitGadget
2022-03-30 22:28 ` Ævar Arnfjörð Bjarmason
2022-03-31 16:52 ` Glen Choo
2022-03-29 20:01 ` [PATCH 4/4] branch: remove negative exit code Glen Choo via GitGitGadget
2022-03-31 18:49 ` [PATCH v2 0/4] branch --recurse-submodules: Bug fixes and clean ups Glen Choo via GitGitGadget
2022-03-31 18:49 ` [PATCH v2 1/4] branch: support more tracking modes when recursing Glen Choo via GitGitGadget
2022-03-31 18:49 ` [PATCH v2 2/4] branch: give submodule updating advice before exit Glen Choo via GitGitGadget
2022-03-31 18:50 ` [PATCH v2 3/4] branch --set-upstream-to: be consistent when advising Glen Choo via GitGitGadget
2022-03-31 18:50 ` [PATCH v2 4/4] branch: remove negative exit code Glen Choo via GitGitGadget
2022-03-31 22:39 ` [PATCH v2 0/4] branch --recurse-submodules: Bug fixes and clean ups Junio C Hamano
2022-03-31 22:41 ` Junio C Hamano [this message]
2022-03-31 22:41 ` [PATCH 2/2] branch.c: simplify advice-and-die sequence Junio C Hamano
2022-04-01 10:03 ` Ævar Arnfjörð Bjarmason
2022-04-01 16:59 ` [PATCH v2 0/4] branch --recurse-submodules: Bug fixes and clean ups Glen Choo
2022-04-01 20:14 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220331224118.3014407-1-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=chooglen@google.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).