summaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2024-05-30 15:43:50 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-30 19:02:58 +0200
commit4c063c82e9611ffd31353ababa96a0a39d9d7d85 (patch)
treedf70d7d1b61e8cd0174592f8e6addba401527280 /builtin
parentrebase -i: pass struct replay_opts to parse_insn_line() (diff)
downloadgit-4c063c82e9611ffd31353ababa96a0a39d9d7d85.tar.xz
git-4c063c82e9611ffd31353ababa96a0a39d9d7d85.zip
rebase -i: improve error message when picking merge
The only todo commands that accept a merge commit are "merge" and "reset". All the other commands like "pick" or "reword" fail when they try to pick a a merge commit and print the message error: commit abc123 is a merge but no -m option was given. followed by a hint about the command being rescheduled. This message is designed to help the user when they cherry-pick a merge and forget to pass "-m". For users who are rebasing the message is confusing as there is no way for rebase to cherry-pick the merge. Improve the user experience by detecting the error and printing some advice on how to fix it when the todo list is parsed rather than waiting for the "pick" command to fail. The advice recommends "merge" rather than "exec git cherry-pick -m ..." on the assumption that cherry-picking merges is relatively rare and it is more likely that the user chose "pick" by a mistake. It would be possible to support cherry-picking merges by allowing the user to pass "-m" to "pick" commands but that adds complexity to do something that can already be achieved with exec git cherry-pick -m1 abc123 Reported-by: Stefan Haller <lists@haller-berlin.de> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions