public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Florian Best <best@univention•de>
To: git@vger•kernel.org
Subject: cherry-pick: add --show-current-patch
Date: Wed, 11 Mar 2026 19:30:55 +0100	[thread overview]
Message-ID: <43529695-5987-486a-bdff-46f573868c4c@univention.de> (raw)

Hello,

When running `git cherry-pick` over a range of commits, the command may 
stop due to conflicts. At that point Git reports the conflict but does 
not provide an easy way to see which commit is currently being 
cherry-picked or what patch is being applied.

`git rebase` provides a helpful option for this situation:

`git rebase --show-current-patch`

This prints the patch of the commit that is currently being applied. I 
believe a similar feature would be useful for `git cherry-pick`.

Currently, when a conflict occurs during a range cherry-pick (e.g. `git 
cherry-pick A..B`), there is no straightforward command to show the 
patch of the commit being applied. While it is possible to inspect 
`.git/CHERRY_PICK_HEAD`and run something like:

`git show $(cat .git/CHERRY_PICK_HEAD)`

this is not very discoverable and requires manual steps.


Proposed feature

Add a command:

`git cherry-pick --show-current-patch`

which would display the patch of the commit currently being applied 
during an in-progress cherry-pick operation (similar to `git rebase 
--show-current-patch`).

Behavior could be:

  * If a cherry-pick is in progress, show the patch corresponding to 
`CHERRY_PICK_HEAD`.
  * If no cherry-pick is in progress, report an appropriate error.


Motivation

This would help users:

  * understand which commit caused the conflict
  * review the exact changes being applied
  * debug large range cherry-picks more easily

It would also provide feature parity with `git rebase`.

Best regards
Florian

-- 
Florian Best
Open Source Software Engineer

Geschäftsführer: Peter H. Ganten, Stefan Gohmann
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876

Univention GmbH
Mary-Somerville-Str. 1
28359 Bremen
Germany / Deutschland

📞 Phone : +49 421 22232-0
🖶 Fax   : +49 421 22232-99
✉️best@univention•de
🌐https://www.univention.de / https://www.univention.com

Managing Directors: Peter H. Ganten, Stefan Gohmann
Local court: Amtsgericht Bremen
HRB 20755 / Steuer-Nr.: 71-597-02876

The information contained in this message is confidential or protected 
by law.
If you are not the intended recipient, please contact the sender and 
delete this message.
Any unauthorized copying of this message or unauthorized distribution of 
the information contained herein is prohibited.
Legally required information for business correspondence: Legal Information

Diese E-Mail enthält vertrauliche oder rechtlich geschützte Informationen.
Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte 
sofort den Absender und löschen Sie diese E-Mail. Das unbefugte Kopieren 
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen 
Informationen ist nicht gestattet.
Gesetzliche Pflichtangaben für Geschäftskorrespondenz: Datenschutzerklärung

             reply	other threads:[~2026-03-11 18:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 18:30 Florian Best [this message]
2026-03-11 19:30 ` cherry-pick: add --show-current-patch Phillip Wood
     [not found]   ` <f2bf231a-2b18-4f1c-9cbc-2b94f669839f@univention.de>
2026-03-16 11:03     ` Phillip Wood
2026-03-17 22:55       ` Florian Best

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43529695-5987-486a-bdff-46f573868c4c@univention.de \
    --to=best@univention$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox