Re: wierd git show syntax

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

 



On 9/30/10 7:02 AM, Geoff Russell wrote:
> Hi,
> 
> $ git show XXXX:data/path/object.c

Show me the contents of the file at data/path/object.c in revision XXXX.

> Gives me what I want, a cat of the objects contents. However
> for some files I get a message about ambiguous argument telling me to
> separate paths from revisions with '--'. Okay so I try that:
> 
> $ git show -- XXXX:data/path/object.c

Show me the commit HEAD but limit the diff to the path
XXXX:data/path/object.c.

There is an implicit HEAD before the double dash. You probably want the
double dash *after* the object, to force git to parse that string as an
object and not a path:

$ git show XXXX:data/path/object.c --

> But it gives me nothing
> 
> $ git show XXXX -- data/path/object.c

Show me the commit XXXX but limit the diff to the path data/path/object.c.

> Gives me a git diff output for the object.
> 
> 
> This is all with git 1.6.2.3
> 
> What's happening here? Why aren't all these equivalent?

no.

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]