summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-01-29 11:06:16 -0800
committerJunio C Hamano <gitster@pobox.com>2026-02-09 08:33:17 -0800
commit12fee11f21e9b63626da5058fa055f95d55a5515 (patch)
tree357c4dc6ccc5ba00c307e8c9abe3924d9d78598f /contrib/persistent-https
parent2096948158ea0b253a68a81c691fdf88ff00589a (diff)
downloadgit-12fee11f21e9b63626da5058fa055f95d55a5515.tar.gz
git-12fee11f21e9b63626da5058fa055f95d55a5515.zip
checkout: tell "parse_remote_branch" which command is calling it
When "git checkout <dwim>" and "git switch <dwim>" need to error out due to ambiguity of the branch name <dwim>, these two commands give an advise message with a sample command that tells the user how to disambiguate from the parse_remote_branch() function. The sample command hardcodes "git checkout", since this feature predates "git switch" by a large margin. To a user who said "git switch <dwim>" and got this message, it is confusing. Pass the "enum checkout_command", which was invented in the previous step for this exact purpose, down the call chain leading to parse_remote_branch() function to change the sample command shown to the user in this advise message. Also add a bit more test coverage for this "fail to DWIM under ambiguity" that we lack, as well as the message we produce when we fail. Reported-by: Simon Cheng <cyqsimon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions