Re: cherry-pick --message?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 21, 2017 at 06:07:34PM +0100, Andreas Krey wrote:

> > There's "cherry-pick --edit".
> 
> Yes, but. I'm in a toolchain, not a user. I'm a command that let
> the user cherry-pick specific things, and I need to edit out the things
> that made the original commit eligible to be picked in the first place.
> 
> Can't quite rely on the tool's user to do that. :-(
> 
> I'm not familiar with the plumbing to know where to look there.

You can do:

  GIT_EDITOR='sed -i d/^PROP:/' git cherry-pick --edit

but if there's a conflict, the user has resume it with that environment
variable set. If you can rely on the user using your tool, that might
work. If they might run arbitrary git commands, then no.

Probably "format-patch | sed | am -3" is your best bet if you want to
modify the patches in transit _and_ have the user just use normal git
tools.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]