All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git-cherry-pick(1) -- path
Date: Fri, 10 May 2024 11:05:29 +0200	[thread overview]
Message-ID: <kk244kap6lhuvtfot55u4yb5k5eddwlzl4izlzqhe4pdj52cx7@slghmpvdswkt> (raw)
In-Reply-To: <xmqqv83mqxg3.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]

Hi Junio,

On Thu, May 09, 2024 at 06:15:24PM GMT, Junio C Hamano wrote:
> Alejandro Colomar <alx@kernel.org> 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?
> 
> Opinions?  
> 
> Personally it is a "Meh" for me, because I would instead do
> 
>     $ git format-patch --stdout -1 $ThatCommit -- $ThisPath |
>       git am -3

Hmmm, I hadn't thought of that; very interesting!

Although I have some concerns with git-am(1); basically that it's almost
clueless when there's a conflict.  With git-cherry-pick(1), at least I
have the ability to resolve the conflict manually.

If I find some time, I'll check if I can program that (although it would
be the first time I do some contribution like that to git(1), so I may
need some help).  :-)

Have a lovely day!
Alex

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

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-05-10  9:05 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
2024-05-10  9:05   ` Alejandro Colomar [this message]
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:
  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=kk244kap6lhuvtfot55u4yb5k5eddwlzl4izlzqhe4pdj52cx7@slghmpvdswkt \
    --to=alx@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.