git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Andreas Krey <a.krey@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: cherry-pick --message?
Date: Tue, 21 Mar 2017 13:33:35 -0400	[thread overview]
Message-ID: <20170321173335.n56veklbh4iginoa@sigill.intra.peff.net> (raw)
In-Reply-To: <20170321170734.GI28331@inner.h.apk.li>

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

  reply	other threads:[~2017-03-21 18:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 16:05 cherry-pick --message? Andreas Krey
2017-03-21 17:00 ` Jeff King
2017-03-21 17:07   ` Andreas Krey
2017-03-21 17:33     ` Jeff King [this message]
2017-03-28 11:30       ` UNS: " Andreas Krey
2017-03-28 18:17         ` Jonathan Nieder

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20170321173335.n56veklbh4iginoa@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=a.krey@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).