git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Johannes Sixt <J.Sixt@eudaptics.com>
Cc: git@vger.kernel.org
Subject: Re: git-rev-list: --objects list inconsistency
Date: Tue, 14 Nov 2006 10:26:46 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0611141020480.3327@woody.osdl.org> (raw)
In-Reply-To: <4559E6A9.9A30A236@eudaptics.com>



On Tue, 14 Nov 2006, Johannes Sixt wrote:
> 
> As you can see, without --objects, master^^..master and --max-count=2
> list the same two commits.

"--max-count=X" and "master^^..master" are two TOTALLY different things.

The fact that they happened to give the same results without "--objects" 
is a random thing, and not at all guaranteed. For example, if "master" (or 
its parent) had been a merge, it probably wouldn't have given the same 
result even _without_ "--objects".

> But with --objects I get different object lists. I don't even know which
> one is the one to expect, but I certainly would not have expected the
> lists to be different. What's wrong here?

Nothing is wrong. You're asking for two totally different things.

With "--max-count=2", you're saying "I want the first two commits", and 
then the "--objects" part extends that to all the other object types too.

So you get two commits _and_ every single object reachable from those two 
commits.

In contrast, with "master^^..master", you're saying "I want everything 
that is reachable from "master", but _not_ reachable from it's 
grand-parent. And the "--objects" flag extends that to all the other 
object types too.

So you get (in this case) two commits _and_ all the objects that are 
reachable from those two commits but that are _not_ reachable from the 
grandparent.

That's a totally different thing, obviously. There's likely to be a lot of 
objects in common between "master" and its grandparent, and you literally 
asked to not be shown those objects. In the first case, you didn't ask for 
the exclusion of the grandparent.

So you should expect a big difference in almost all cases. In one case, 
you ask for an exclusion, in the other case, you just say "just the first 
two commits, please". Not at all equivalent.


      parent reply	other threads:[~2006-11-14 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14 15:54 git-rev-list: --objects list inconsistency Johannes Sixt
2006-11-14 17:58 ` Junio C Hamano
2006-11-14 18:26 ` Linus Torvalds [this message]

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.0611141020480.3327@woody.osdl.org \
    --to=torvalds@osdl.org \
    --cc=J.Sixt@eudaptics.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).