Re: potential improvement to 'git log' with a range

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

 



On Sat, Apr 10, 2010 at 1:24 AM, Aghiles <aghilesk@xxxxxxxxx> wrote:
> If I type:
>
>    git log FETCH_HEAD~4..HEAD
>
> I get something. But if I type:
>
>    git log HEAD..FETCH_HEAD~4
>
> I get nothing. Is there a good reason for that ?
>

Yes.

$ git log -h
usage: git log [<options>] [<since>..<until>] [[--] <path>...]

So <since> and <until> are not equivalent. It list commits in <until>
but not in <since>.

In your case HEAD has commits not in FETCH_HEAD~4 (your first command)
while FETCH_HEAD~4 does not have commits not in HEAD. So HEAD is a
descendent of FETCH_HEAD~4.

Hope I didn't misunderstood your question.

HTH,
Santi
--
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]