From: Tomas Carnecky <tom@dbservice.com>
To: geoffrey.russell@gmail.com
Cc: git@vger.kernel.org
Subject: Re: wierd git show syntax
Date: Thu, 30 Sep 2010 10:46:53 +0200 [thread overview]
Message-ID: <4CA44E7D.7090901@dbservice.com> (raw)
In-Reply-To: <AANLkTi=Zz-1dSC0imJ3NZXWcdvhXWXt-Kk94zwKe8+6Y@mail.gmail.com>
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
next prev parent reply other threads:[~2010-09-30 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 5:02 wierd git show syntax Geoff Russell
2010-09-30 8:46 ` Tomas Carnecky [this message]
2010-09-30 9:02 ` Tomas Carnecky
2010-09-30 11:32 ` Matthieu Moy
2010-10-04 22:32 ` Geoff Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CA44E7D.7090901@dbservice.com \
--to=tom@dbservice.com \
--cc=geoffrey.russell@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).