git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 11:02:07 +0200	[thread overview]
Message-ID: <4CA4520F.30809@dbservice.com> (raw)
In-Reply-To: <4CA44E7D.7090901@dbservice.com>

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

  reply	other threads:[~2010-09-30  9:02 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
2010-09-30  9:02   ` Tomas Carnecky [this message]
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=4CA4520F.30809@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).