Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <>
To: Alejandro Colomar <>
Subject: Re: git-cherry-pick(1) -- path
Date: Thu, 09 May 2024 18:15:24 -0700	[thread overview]
Message-ID: <xmqqv83mqxg3.fsf@gitster.g> (raw)
In-Reply-To: <e5pklmijfpbsnl2trj4n4czam7n7i37gx7w56med2pfaf6q3yx@wizseio2ickk> (Alejandro Colomar's message of "Fri, 10 May 2024 00:32:30 +0200")

Alejandro Colomar <> writes:

> I'd be interested in being able to partially cherry-pick commits, based
> on a path filter (similar to how many other git(1) commands behave with
> -- path).
> Do you have any opinions on that?


Personally it is a "Meh" for me, because I would instead do

    $ git format-patch --stdout -1 $ThatCommit -- $ThisPath |
      git am -3

which would be mostly sufficient for my purpose, but I do not see
any fundamental reason why it should not exist.

It is already well known that future merges from the same branch
will have to deal with duplicated changes brought in by picking
commits with "git cherry-pick".  Having a pathspec-limited variant
of "git cherry-pick" would not make the world a worse place.

  reply	other threads:[~2024-05-10  1:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 22:32 git-cherry-pick(1) -- path Alejandro Colomar
2024-05-10  1:15 ` Junio C Hamano [this message]
2024-05-10  9:05   ` Alejandro Colomar
2024-05-10 10:00     ` Phillip Wood
2024-05-10 17:03       ` Junio C Hamano
2024-05-11 11:46         ` Alejandro Colomar
2024-05-11 15:01           ` Phillip Wood
2024-05-11 20:08             ` Alejandro Colomar
2024-05-12 15:35               ` Alejandro Colomar
2024-05-13 15:16               ` Phillip Wood

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:

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

  git send-email \
    --in-reply-to=xmqqv83mqxg3.fsf@gitster.g \ \ \ \

* 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.
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).