New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
po: use switch
over checkout
in error message
#1308
base: master
Are you sure you want to change the base?
Conversation
Welcome to GitGitGadgetHi @vegerot, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests. Please make sure that your Pull Request has a good description, as it will be used as cover letter. You can CC potential reviewers by adding a footer to the PR description with the following syntax:
Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:
It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code. Contributing the patchesBefore you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a comment to your PR of the form Both the person who commented An alternative is the channel
Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment If you want to see what email(s) would be sent for a After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions (while the comments and suggestions will be mirrored into the PR by GitGitGadget, you will still want to reply via mail). If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox from the Git mailing list archive (click the curl -g --user "<EMailAddress>:<Password>" \
--url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt To iterate on your change, i.e. send a revised patch or patch series, you will first want to (force-)push to the same branch. You probably also want to modify your Pull Request description (or title). It is a good idea to summarize the revision by adding something like this to the cover letter (read: by editing the first comment on the PR, i.e. the PR description):
To send a new iteration, just add another PR comment with the contents: Need help?New contributors who want advice are encouraged to join git-mentoring@googlegroups.com, where volunteers who regularly contribute to Git are willing to answer newbie questions, give advice, or otherwise provide mentoring to interested contributors. You must join in order to post or view messages, but anyone can join. You may also be able to find help in real time in the developer IRC channel, |
There are issues in commit 87ef2b7: |
/allow |
User vegerot is now allowed to use GitGitGadget. |
@dscho what're the next steps? |
I hope that these instructions are clear enough: #1308 (comment) |
@vegerot ⬆️ |
Small change. Since `switch` is suggested for changing branches over `checkout`, this commit updates an error message to use `switch` as the default Signed-off-by: Max 👨🏽💻 Coplan <mchcopl@gmail.com>
87ef2b7
to
0b342cf
Compare
@dscho thank you 🙂. How is this? |
@vegerot I think it's ready for |
/submit |
Submitted as pull.1308.git.git.1668018620148.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
thank you! 😊 |
On the Git mailing list, Taylor Blau wrote (reply to this): On Wed, Nov 09, 2022 at 06:30:17PM +0000, Max Coplan via GitGitGadget wrote:
> From: =?UTF-8?q?Max=20=F0=9F=91=A8=F0=9F=8F=BD=E2=80=8D=F0=9F=92=BB=20Copl?=
> =?UTF-8?q?an?= <mchcopl@gmail.com>
>
> Small change. Since `switch` is suggested for changing branches over
> `checkout`, this commit updates an error message to use `switch` as the
> default
OK.
> Signed-off-by: Max 👨🏽💻 Coplan <mchcopl@gmail.com>
Hmm ;-). It is generally preferred that you use your real name in the
Signed-off-by trailer. I am guessing that your name does not have emoji
in it.
See Documentation/SubmittingPatches for more.
> builtin/checkout.c | 2 +-
> po/bg.po | 4 ++--
> po/ca.po | 4 ++--
> po/de.po | 4 ++--
> po/el.po | 4 ++--
> po/es.po | 4 ++--
> po/fr.po | 4 ++--
> po/id.po | 4 ++--
> po/it.po | 4 ++--
> po/pl.po | 4 ++--
> po/pt_PT.po | 2 +-
> po/ru.po | 2 +-
> po/sv.po | 4 ++--
> po/tr.po | 4 ++--
> po/vi.po | 4 ++--
> po/zh_CN.po | 4 ++--
> po/zh_TW.po | 4 ++--
Changes to po/ are coordinated by Jiang Xin, and the changes happen at:
https://github.com/git-l10n/git-po/
and are then pulled into this tree.
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index 29c74f898bf..51f9f928113 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
> @@ -1222,7 +1222,7 @@ static const char *parse_remote_branch(const char *arg,
> advise(_("If you meant to check out a remote tracking branch on, e.g. 'origin',\n"
> "you can do so by fully qualifying the name with the --track option:\n"
> "\n"
> - " git checkout --track origin/<name>\n"
> + " git switch --track origin/<name>\n"
> "\n"
> "If you'd like to always have checkouts of an ambiguous <name> prefer\n"
> "one remote, e.g. the 'origin' remote, consider setting\n"
Now we get to the main part of the change. And here I am torn:
- parse_remote_branch() is called from parse_branchname_arg()
- parse_branchname_arg() has a single caller in checkout_main()
...which is called from 'cmd_switch()', 'cmd_restore()', and
'cmd_checkout()'.
So depending on which of those three we are being called from, the
advice will or won't match up with the caller.
I haven't looked further to see if there is some mitigating condition
that prevents us from ending up in parse_remote_branch() from callers
outside of 'cmd_switch()', but I'm guessing that probably isn't the
case.
So in that sense your patch isn't making anything worse, but I think
empirically it does seem worse, since 'checkout' has more staying-power
than 'switch' (at least at the time of writing).
We could set some static 'source' variable or some such to indicate
which caller is driving us, but that feels a little hacky.
I dunno.
Thanks,
Taylor |
User |
This branch is now known as |
This patch series was integrated into seen via 857e490. |
This patch series was integrated into seen via eaf95f8. |
This patch series was integrated into seen via 2372ff5. |
This patch series was integrated into seen via f273994. |
This patch series was integrated into seen via 9e7f799. |
This patch series was integrated into seen via 111ea47. |
This patch series was integrated into seen via a8d2876. |
This patch series was integrated into seen via 8043dbd. |
This patch series was integrated into seen via 007178a. |
This patch series was integrated into seen via 5c59dca. |
This patch series was integrated into seen via ba5bd4f. |
This patch series was integrated into seen via ed2e09a. |
This patch series was integrated into seen via 5b3d292. |
This patch series was integrated into seen via db568ba. |
This patch series was integrated into seen via 5451434. |
This patch series was integrated into seen via b0a3ad3. |
There was a status update in the "Stalled" section about the branch Use 'switch' instead of 'checkout' in an error message. Waiting for review response. source: <pull.1308.git.git.1668018620148.gitgitgadget@gmail.com> |
This patch series was integrated into seen via 072f1d1. |
This patch series was integrated into seen via 6ae8cfd. |
This patch series was integrated into seen via 3876b65. |
There was a status update in the "Stalled" section about the branch Use 'switch' instead of 'checkout' in an error message. Waiting for review response. source: <pull.1308.git.git.1668018620148.gitgitgadget@gmail.com> |
There was a status update in the "Stalled" section about the branch Use 'switch' instead of 'checkout' in an error message. Waiting for review response. source: <pull.1308.git.git.1668018620148.gitgitgadget@gmail.com> |
There was a status update in the "Stalled" section about the branch Use 'switch' instead of 'checkout' in an error message. Waiting for review response. source: <pull.1308.git.git.1668018620148.gitgitgadget@gmail.com> |
This patch series was integrated into seen via 12f442a. |
This patch series was integrated into seen via c063d1e. |
This patch series was integrated into seen via d75102b. |
This patch series was integrated into seen via af2f64d. |
There was a status update in the "Stalled" section about the branch Use 'switch' instead of 'checkout' in an error message. Waiting for review response. source: <pull.1308.git.git.1668018620148.gitgitgadget@gmail.com> |
This patch series was integrated into seen via b917d68. |
This patch series was integrated into seen via 9284556. |
This patch series was integrated into seen via f8a1223. |
This patch series was integrated into seen via ec1bcd2. |
This patch series was integrated into seen via 8e4d522. |
This patch series was integrated into seen via 5615462. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
There was a status update in the "Discarded" section about the branch Use 'switch' instead of 'checkout' in an error message. Will discard. Getting tired of waiting for review response. |
Small change. Since
switch
is suggested for changing branches overcheckout
, this commit updates an error message to useswitch
as thedefault
Thanks for taking the time to contribute to Git! Please be advised that the
Git community does not use github.com for their contributions. Instead, we use
a mailing list (git@vger.kernel.org) for code submissions, code reviews, and
bug reports. Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
to conveniently send your Pull Requests commits to our mailing list.
Please read the "guidelines for contributing" linked above!
cc: Taylor Blau me@ttaylorr.com