Subject: Re: wierd git show syntax

From: Tomas Carnecky <[email-masked]>
Date: Thu, 30 Sep 2010 11:02:07 +0200

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