* Understanding git cherry-pick
[not found] <10192863.654644.1289397257054.JavaMail.root@mail.hq.genarts.com>
@ 2010-11-10 14:04 ` Stephen Bash
2010-11-10 19:43 ` Camille Moncelier
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Bash @ 2010-11-10 14:04 UTC (permalink / raw
To: Git Mailing List
Hi all-
In helping a coworker yesterday with a git cherry-pick operation, I found my mental model of cherry-pick seems to be flawed. Our goal was to cherry-pick one commit from the current development branch back to the stable release branch (we're still training everyone on the *correct* way to do maintenance fixes). Here's what happened:
$ git checkout release-branch
$ git cherry-pick 8815f3a0c2c248db223e41b0538f0c48b45fe52d
warning: too many files (created: 237 deleted: 2558), skipping inexact rename detection
Automatic cherry-pick failed. After resolving the conflicts, mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result with:
git commit -c 8815f3a0c2c248db223e41b0538f0c48b45fe52d
git status reported the actual change we wanted from the commit applied cleanly; the conflicts were all added/deleted files between the two branches. The commit only modifies a single file, and the file exists with the same name on both branches.
So what's actually going on here? If the one changed file in the commit merged cleanly, why did the automatic cherry-pick fail? Why does cherry-pick even care about file differences between the two branches that aren't modified by the commit in question? Or is it user error?
Thanks,
Stephen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding git cherry-pick
2010-11-10 14:04 ` Understanding git cherry-pick Stephen Bash
@ 2010-11-10 19:43 ` Camille Moncelier
2010-11-10 20:01 ` Stephen Bash
0 siblings, 1 reply; 3+ messages in thread
From: Camille Moncelier @ 2010-11-10 19:43 UTC (permalink / raw
To: git
On Wed, 10 Nov 2010 09:04:29 -0500 (EST)
Stephen Bash <bash@genarts.com> wrote:
> git status reported the actual change we wanted from the commit
> applied cleanly; the conflicts were all added/deleted files between
> the two branches. The commit only modifies a single file, and the
> file exists with the same name on both branches.
>
> So what's actually going on here? If the one changed file in the
> commit merged cleanly, why did the automatic cherry-pick fail? Why
> does cherry-pick even care about file differences between the two
> branches that aren't modified by the commit in question? Or is it
> user error?
Which version are you using ? I had problem using anything < 1.7.3
when the cherry-pick happened between two branches where some files
changed theirs types eg: a link become a file (But not the other way
around)
See:
http://thread.gmane.org/gmane.comp.version-control.git/160717/focus=160717
>
> Thanks,
> Stephen
--
Camille Moncelier
http://devlife.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding git cherry-pick
2010-11-10 19:43 ` Camille Moncelier
@ 2010-11-10 20:01 ` Stephen Bash
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Bash @ 2010-11-10 20:01 UTC (permalink / raw
To: Camille Moncelier; +Cc: Git Mailing List
----- Original Message -----
> From: "Camille Moncelier" <moncelier@devlife.org>
> To: "Stephen Bash" <bash@genarts.com>
> Sent: Wednesday, November 10, 2010 2:43:23 PM
> Subject: Re: Understanding git cherry-pick
>
> On Wed, 10 Nov 2010 09:04:29 -0500 (EST)
> Stephen Bash <bash@genarts.com> wrote:
>
> > git status reported the actual change we wanted from the commit
> > applied cleanly; the conflicts were all added/deleted files between
> > the two branches. The commit only modifies a single file, and the
> > file exists with the same name on both branches.
> >
> > So what's actually going on here? If the one changed file in the
> > commit merged cleanly, why did the automatic cherry-pick fail? Why
> > does cherry-pick even care about file differences between the two
> > branches that aren't modified by the commit in question? Or is it
> > user error?
>
> Which version are you using ?
1.7.3 on the machine I reproduced the issue on... My coworker has something post-1.7.2 but I'm not exactly sure.
Thanks,
Stephen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-10 20:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <10192863.654644.1289397257054.JavaMail.root@mail.hq.genarts.com>
2010-11-10 14:04 ` Understanding git cherry-pick Stephen Bash
2010-11-10 19:43 ` Camille Moncelier
2010-11-10 20:01 ` Stephen Bash
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).