Re: wierd git show syntax

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

 



On 9/30/10 10:46 AM, Tomas Carnecky wrote:
>> What's happening here? Why aren't all these equivalent?
> 
> no.

A 'no' does not really fit a 'why?' question. I should explain.

Someone (Linus?) long ago decided that the revision parsing work that
way. It's pretty powerful, even the smallest colon and double dash have
a meaning. But it can be complicated for someone new to git to
understand. See 'man gitrevisions' to understand how git parses
revisions. Sadly the effect of double bash is not described in the
git-show man page. But in most commands it's used to separate revisions
from paths. Example: if you have a file and branch both named master,
'git log master --' will show you the log of that branch while 'git log
-- master' will show you the log of HEAD but limit it to commits which
touched the file master. Again, there's an implicit HEAD before the
double dash.

tom




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