Re: Question about git-cherry and the rev list it's using

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

 



Francis Moreau venit, vidit, dixit 11.05.2011 18:11:
> Hello,
> 
> I'm using "git cherry old master base" to see if all commits between
> master and base have been applied in my 'old' branch.
> 
> So I expect that git cherry is using a list of commits given by : "git
> rev-list --no-merges base..master".

Not really.

For each commit in "--no-merges old..master ^base" (i.e. "--no-merges
master ^old ^base"), "git cherry" checks whether there is a patch
equivalent commit in "--no-merges master..old", and outputs it with + or -.

> But it looks like it's not the case:
> 
>   $ git rev-list --no-merges --oneline base..master | wc -l
>   22
> 
>   $ git cherry old master base | wc -l
>   12
> 
> Could anybody help me on this because I don't understand the results I have ?

"--no-merges ^old ^base" should rev-list --count to 12.

But you may be better off with something like

git rev-list --count --cherry master...old ^base

(untested)

Michael
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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