git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Potapov <dpotapov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jakub Narebski <jnareb@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	git@vger.kernel.org
Subject: Re: [q] git-diff --reverse 7def2be1..7def2be1^
Date: Mon, 7 Jul 2008 08:01:31 +0400	[thread overview]
Message-ID: <20080707040131.GC1721@dpotapov.dyndns.org> (raw)
In-Reply-To: <7vbq1ad4nn.fsf@gitster.siamese.dyndns.org>

On Sun, Jul 06, 2008 at 03:33:16PM -0700, Junio C Hamano wrote:
> Dmitry Potapov <dpotapov@gmail.com> writes:
> 
> > git rev-list 7ac749c^@..7ac749c
> > fatal: ambiguous argument '7ac749c^@..7ac749c': unknown revision or path
> > not in the working tree.
> >
> > yet "^rev^@ rev" syntax does:
> >
> > git rev-list ^7ac749c^@ 7ac749c
> > 7ac749c96d143ba4f76723959892cbaddbe8ed07
> >
> > Is it a bug or feature?
> >
> > Puzzled...
> 
> After reading these paragraphs from "SPECIFYING RANGES":
> 
>         History traversing commands such as 'git-log' operate on a set
>         of commits, not just a single commit.  To these commands,
>         specifying a single revision with the notation described in the
>         previous section means the set of commits reachable from that
>         commit, following the commit ancestry chain.
> 
>         To exclude commits reachable from a commit, a prefix `{caret}`
>         notation is used.  E.g. "`{caret}r1 r2`" means commits reachable
>         from `r2` but exclude the ones reachable from `r1`.
> 
>         This set operation appears so often that there is a shorthand
>         for it.  "`r1..r2`" is equivalent to "`{caret}r1 r2`".  It is
>         the difference of two sets (subtract the set of commits
>         reachable from `r1` from the set of commits reachable from
>         `r2`).
> 
> it is obvious to me that the third paragraph talks about r1 that is a
> single rev (refer to SPECIFYING REVISIONS section, which does _NOT_ talk
> about rev^@ nor rev^!)  and r2 that similarly is another single rev.  So I
> think it is fairly clear that your "r^@..r" example is nonsense.

I think both second and third paragraphs talk about r1 as a single
revision. Yet, it is allowed to use "^r^@ r", and it works fine while
you cannot use "r^@..r". Of course, this behavior does not contradict
documentation, as it says _nothing_ about what will happen if you use
"r^@" instead of r1. That is why asked whether it is a bug or feature.
It still escapes me though, why you consider "r^@..r" as nonsense while
"^r^@ r" as correct syntax. Not that I am trying to argue with how it
should work, but I am just trying to understand your logic here.

Dmitry

  reply	other threads:[~2008-07-07  4:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20  8:20 [q] git-diff --reverse 7def2be1..7def2be1^ Ingo Molnar
2008-06-20  8:38 ` Junio C Hamano
2008-06-20  8:46   ` Junio C Hamano
2008-06-20 10:00     ` Ingo Molnar
2008-06-20 10:02   ` Ingo Molnar
2008-06-20 10:05 ` Jakub Narebski
2008-06-20 13:02   ` Mikael Magnusson
2008-06-20 13:13     ` Jakub Narebski
2008-06-20 13:52   ` Ingo Molnar
2008-06-22 18:52     ` Andreas Ericsson
2008-07-06 16:16   ` Dmitry Potapov
2008-07-06 20:04     ` Junio C Hamano
2008-07-06 20:39       ` Dmitry Potapov
2008-07-06 22:33         ` Junio C Hamano
2008-07-07  4:01           ` Dmitry Potapov [this message]
2008-06-20 11:30 ` Matthieu Moy
2008-06-20 13:50   ` Ingo Molnar
2008-06-20 14:23     ` Jakub Narebski
     [not found]       ` <20080620153819.GF17373@elte.hu>
2008-06-20 15:38         ` Ingo Molnar
2008-06-26  9:37       ` Ingo Molnar
2008-06-26 11:02         ` Jakub Narebski
2008-06-26 11:08           ` Ingo Molnar
2008-06-26 13:50           ` Nicolas Pitre
2008-06-28 22:08         ` Junio C Hamano
2008-06-20 13:04 ` Mikael Magnusson

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=20080707040131.GC1721@dpotapov.dyndns.org \
    --to=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=mingo@elte.hu \
    /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).