From: Nikolaus Rath <Nikolaus@rath.org>
To: git@vger.kernel.org
Subject: Re: How to find commits unique to a branch
Date: Wed, 22 Jun 2016 09:38:23 -0700 [thread overview]
Message-ID: <87k2hhgow0.fsf@thinkpad.rath.org> (raw)
In-Reply-To: <8a97003e-fa74-2d9b-f2a8-946614be649c@drmicha.warpmail.net> (Michael J. Gruber's message of "Tue, 21 Jun 2016 10:28:53 +0200")
On Jun 21 2016, Michael J Gruber <git@drmicha.warpmail.net> wrote:
> Nikolaus Rath venit, vidit, dixit 21.06.2016 01:21:
>> On Jun 20 2016, Junio C Hamano <gitster@pobox.com> wrote:
>>> Nikolaus Rath <Nikolaus@rath.org> writes:
>>>
>>>> What's the best way to find all commits in a branch A that have not been
>>>> cherry-picked from (or to) another branch B?
>>>>
>>>> I think I could format-patch all commits in every branch into separate
>>>> files, hash the Author and Date of each files, and then compare the two
>>>> lists. But I'm hoping there's a way to instead have git do the
>>>> heavy-lifting?
>>>
>>> "git cherry" perhaps?
>>
>> That seems to work only the "wrong way around". I have a tag
>> fuse_3_0_start, which is the common ancestor to "master" and
>> "fuse_2_9_bugfix". I'd like to find all the commits from fuse_3_0_start
>> to master that have not been cherry-picked into fuse_2_9_bugfix.
>>
>> However:
>>
>> * "git cherry fuse_3_0_start master release2.9" tells me nothing has
>> been cherry-picked at all (only lines with +)
>>
>> * "git cherry fuse_3_0_start release2.9 master" also tells me nothing
>> has been cherry picked, but somehow shows a smaller total number of
>> commits.
>>
>> * "git cherry master release2.9 fuse_3_0_start" gives me the commits
>> from fuse_2_9_bugfix that have not been cherry-picked into master
>> (which seems to be in contradiction to the two earlier commands).
>>
>>
>> Am I missing something obvious?
>
> There is always
>
> git log --left-right --cherry-mark A...B
>
> to give you a good overview of the situation.
This worked nicely too, thanks!
Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
next prev parent reply other threads:[~2016-06-22 16:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 20:43 How to find commits unique to a branch Nikolaus Rath
2016-06-20 22:21 ` Junio C Hamano
2016-06-20 23:21 ` Nikolaus Rath
2016-06-21 8:28 ` Michael J Gruber
2016-06-22 16:38 ` Nikolaus Rath [this message]
2016-06-21 18:04 ` Nikolaus Rath
2016-06-21 18:31 ` Junio C Hamano
2016-06-22 16:38 ` Nikolaus Rath
2016-06-22 18:20 ` Junio C Hamano
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=87k2hhgow0.fsf@thinkpad.rath.org \
--to=nikolaus@rath.org \
--cc=git@vger.kernel.org \
/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.