git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Jon Loeliger <jdl@freescale.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: how to find outstanding patches in non-linux-2.6 repositories ?
Date: Tue, 3 Jan 2006 11:41:15 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0601031123150.3668@g5.osdl.org> (raw)
In-Reply-To: <1136315518.11946.28.camel@cashmere.sps.mot.com>



On Tue, 3 Jan 2006, Jon Loeliger wrote:
> 
> Could someone remind me where the <ref>..<ref> syntax
> is documented, please?  I went digging, but I am lame
> and couldn't find it.

Hmm. It probably isn't. Technically, "start..end" is exactly the same 
thing as "end" + "^start", with an empty "end" being the same as HEAD (an 
empty "start" is largely meaningless and isn't supported - we _could_ make 
it mean the same as just specifying "end").

You can see this with "git-rev-parse":

	[torvalds@g5 linux]$ git-rev-parse v2.6.12..v2.6.15
	88026842b0a760145aa71d69e74fbc9ec118ca44
	^26791a8bcf0e6d33f43aef7682bdb555236d56de

ie it really does literally that transformation.

NOTE! Normally the "a" + "^b" format just means "everything that is 
reachable through "a", but not reachable through "b". In other words, it 
almost always ends up being a "commit set operation", and you can combine 
it with other "set" operations (like "--before=<date>" or other limiters).

But there is one special case: "git diff" will consider that to be a range 
of end-points, and will generate a diff from "b" to "a". It will do this 
regardless of whether "a" and "b" are even related, and it will _not_ care 
about set differences.

So there's a very fundamental difference between two things that 
_syntactically_ look very similar:

	git log a..b

and 

	git diff a..b

may look like they are related, but they really really are not. They are 
very very different.

The "git log" thing will show the commit log for every commit that is in 
"b" but not in "a". HOWEVER, if there's something in "a" that is not in 
"b" it will totally ignore it - it _literally_ means "show everything that 
is reachable from "b" but not reachable from "a". 

So doing "git log a..b" and "git log b..a" are _not_ "reverse" operations. 
They show totally disjunct sets. If one is a superset of the other, one of 
those will be empty. But if they have different development, the two "git 
log" commands will show what happened on one side but not the other.

In contrast, "git diff a..b" will show the raw differences between two 
heads. So doing "git diff a..b" and "git diff b..a" is exactly the same 
thing, the diff will just be "reversed". It's not an operation on a set of 
commits: it's purely an operation on the two end-points.

So keep this in mind: the meaning of "a..b" actually depends on the 
operation you do, although in all cases it will be exactly equivalent to 
"a" and "^b" (with the special case for an empty "a" meaning HEAD).

			Linus

  parent reply	other threads:[~2006-01-03 19:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-01 20:01 how to find outstanding patches in non-linux-2.6 repositories? Olaf Hering
2006-01-01 20:42 ` Brian Gerst
2006-01-01 21:04   ` Olaf Hering
2006-01-01 21:32     ` Johannes Schindelin
2006-01-03 19:11       ` how to find outstanding patches in non-linux-2.6 repositories ? Jon Loeliger
2006-01-03 19:21         ` Marco Roeland
2006-01-03 19:35         ` Andreas Ericsson
2006-01-04  1:26           ` Tom Prince
2006-01-03 19:41         ` Linus Torvalds [this message]
2006-01-01 23:09 ` how to find outstanding patches in non-linux-2.6 repositories? Linus Torvalds

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=Pine.LNX.4.64.0601031123150.3668@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=jdl@freescale.com \
    /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).