Re: git-cherry-pick(1) -- path

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

 



Hi Junio,

On Thu, May 09, 2024 at 06:15:24PM GMT, Junio C Hamano wrote:
> Alejandro Colomar <alx@xxxxxxxxxx> 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: signature.asc
Description: PGP signature


[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]

  Powered by Linux