pr-git-2331/HaraldNordgren/suggest-remote-branch-slips-v1
tagged this
12 Jun 11:10
When the repository or upstream argument is a slip like "origin/main" or "origin main", suggest the intended "git push origin main" or "git branch --set-upstream-to=origin/main" form instead of failing with an unrelated error. Harald Nordgren (2): branch: suggest <remote>/<branch> on upstream slip push: suggest <remote> <branch> for a slash slip Documentation/config/advice.adoc | 5 +++++ advice.c | 1 + advice.h | 1 + builtin/branch.c | 17 ++++++++++++++ builtin/push.c | 26 +++++++++++++++++++++- t/t3200-branch.sh | 38 ++++++++++++++++++++++++++++++++ t/t5529-push-errors.sh | 31 ++++++++++++++++++++++++++ 7 files changed, 118 insertions(+), 1 deletion(-) base-commit: 3e65291872de10c3f0bf05ea8c24187e7a71ebf0 Submitted-As: https://lore.kernel.org/git/pull.2331.git.git.1781262619.gitgitgadget@gmail.com