All of lore.kernel.org
 help / color / mirror / Atom feed
* git cherry doesn't list a merge commit
@ 2012-02-13 15:17 Tajti Ákos
  2012-02-13 18:57 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Tajti Ákos @ 2012-02-13 15:17 UTC (permalink / raw)
  To: git

Dear List,

I have a question/misunderstanding about 'git cherry'. The scenario is 
the following:
I have two repositories (two forks of the same parent repo): A and B. I 
created a commit in A, then pulled B to A and finally made an other 
commit in A. This resulted the following commits:

-----
commit f6afabb0a734843d5d122b612f0701d27b178e42
Author: akostajti <akos.tajti@intland.com>
Date: Mon Feb 13 15:59:51 2012 +0100

modified a

commit 4ec4d59f632b93456890db139125419d16a10807
Merge: a73e884 2a483e8
Author: akostajti <akos.tajti@intland.com>
Date: Mon Feb 13 15:59:34 2012 +0100

Merge branch 'master' of http://localhost:3180/git/first-60-project

commit a73e884d2dadf29898c2d6b665ed79d352422d26
Author: akostajti <akos.tajti@intland.com>
Date: Mon Feb 13 15:58:48 2012 +0100

hkl
-----

Now If I fetch B to A and run 'git cherry FETCH_HEAD master' I get only 
two changeset ids:
+ a73e884d2dadf29898c2d6b665ed79d352422d26
+ f6afabb0a734843d5d122b612f0701d27b178e42

However, the manual of git cherry says:
"*Every* commit that doesn’t exist in the <upstream> branch has its id 
(sha1) reported, prefixed by a symbol. The ones that have equivalent 
change already in the <upstream> branch are prefixed with a minus (-) sign"

In my understanding this means that the merge commit 
(4ec4d59f632b93456890db139125419d16a10807) should be also listed by 
cherry, because it doesn't exist in the upstream. Am I doing something 
wrong? How can I ge git cherry work as I expect?

Thanks in advance,
Ákos Tajti

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git cherry doesn't list a merge commit
  2012-02-13 15:17 git cherry doesn't list a merge commit Tajti Ákos
@ 2012-02-13 18:57 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-02-13 18:57 UTC (permalink / raw)
  To: Tajti Ákos; +Cc: git

Tajti Ákos <akos.tajti@intland.com> writes:

> However, the manual of git cherry says:
> "*Every* commit that doesn’t exist in the <upstream> branch has its
> id (sha1) reported, prefixed by a symbol. The ones that have
> equivalent change already in the <upstream> branch are prefixed with a
> minus (-) sign"

The sole purpose of the command is to decide which commits in the existing
history to run "format-patch" on to feed the output to "am" to update the
other history, and it was clear for both readers and the author of the
documentation that a "commit" meant a "non-merge commit" in that context.

A patch to rephrase it to "every non-merge commit" for clarity may not be
useless, though.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-13 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 15:17 git cherry doesn't list a merge commit Tajti Ákos
2012-02-13 18:57 ` Junio C Hamano

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.