Skip to content

Allow 'cherry-pick -m 1' for non-merge commits

Sergey Organov git 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v24 patches 5 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4t3510: stop using '-m 1' to force failure mid-sequence of cherry-pickst/t3510-cherry-pick-sequence.sh+6 -20 replies
2/4cherry-pick: do not error on non-merge commits when '-m 1' is specifiedsequencer.c+7 -30 replies
3/4t3502: validate '-m 1' argument is now accepted for non-merge commitst/t3502-cherry-pick-merge.sh+6 -60 replies
4/4t3506: validate '-m 1 -ff' is now accepted for non-merge commitst/t3506-cherry-pick-ff.sh+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/4] Allow 'cherry-pick -m 1' for non-merge commits

Change from v2: t/t3502: disambiguation added to prevent failing on case-insensitive file systems.

When cherry-picking multiple commits, it's impossible to have both merge- and non-merge commits on the same command-line. Not specifying '-m 1' results in cherry-pick refusing to handle merge commits, while specifying '-m 1' fails on non-merge commits.

This patch series allow '-m 1' for non-merge commits as well as fixes relevant tests in accordance.

It also opens the way to making '-m 1' the default, that would be inline with the trends to assume first parent to be the mainline in most workflows.

Sergey Organov (4):
t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks
cherry-pick: do not error on non-merge commits when '-m 1' is
specified
t3502: validate '-m 1' argument is now accepted for non-merge commits
t3506: validate '-m 1 -ff' is now accepted for non-merge commits

 sequencer.c                     | 10 +++++++---
 t/t3502-cherry-pick-merge.sh    | 12 ++++++------
 t/t3506-cherry-pick-ff.sh       |  6 +++---
 t/t3510-cherry-pick-sequence.sh |  8 ++++++--
 4 files changed, 22 insertions(+), 14 deletions(-)
Signature · 1 line
2.10.0.1.g57b01a3