git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Paul Mackerras <paulus@samba.org>
Cc: git@vger.kernel.org
Subject: Re: gitk highlight feature
Date: Wed, 3 May 2006 16:25:57 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0605031612230.4086@g5.osdl.org> (raw)
In-Reply-To: <17497.14311.121872.249120@cargo.ozlabs.ibm.com>



On Thu, 4 May 2006, Paul Mackerras wrote:
> 
> On my G5:
> 
> $ git-rev-list HEAD >all-revs
> $ time git-rev-list HEAD -- arch/powerpc >ppc-revs
> real    0m2.463s
> user    0m2.265s
> sys     0m0.191s
> $ time git-diff-tree -s --stdin -- arch/powerpc <all-revs >ppc-revs2
> real    0m5.269s
> user    0m4.794s
> sys     0m0.462s

Right. One of them prunes the history (git-rev-list). The other one does 
not.

That said, you need an "-r", I guess, to "git-diff-tree".

> Why does git-diff-tree -s --stdin produce so many more revisions than
> git-rev-list?

I guess it's officially a FAQ by now: see the "bug in git log" thread the 
other day, and

        http://www.gelato.unsw.edu.au/archives/git/0604/19180.html

so in general you can get _more_ of the "real commits" with "git-rev-list 
| git-diff-tree --stdin", because it won't prune out history on 
uninteresting branches. At the same time, that effect is counter-acted by 
git-diff-tree normally ignoring merges by default, which is a bigger 
issue.

Your big problem is just the lack of "-r", though:

> The git-diff-tree output includes commits such as
> 6ba815de, which only affects arch/i386/kernel/timers/timer_tsc.c.
> Confused.

Without the -r, git-diff-tree won't actually recurse, so it hits the 
"arch/" part (which does differ, and matches te revspec), and decides it's 
done.

With the "-r" thing, you still have a noticeable difference, but now it's 
due to the difference between "log" and "diff":

   git-rev-list HEAD -- arch/powerpc | wc -l
    -> 892
   git-rev-list HEAD | git-diff-tree -r -s --stdin -- arch/powerpc/ | wc -l
    -> 838

ie "diff" doesn't show merges nomally (with -m, you _will_ get merges, but 
you'll sometimes get them twice - once against each parent ;)

		Linus

  reply	other threads:[~2006-05-03 23:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02 23:44 gitk highlight feature Paul Mackerras
2006-05-02 23:48 ` Junio C Hamano
2006-05-03  0:17   ` Paul Mackerras
2006-05-03  0:07 ` Linus Torvalds
2006-05-03  0:23   ` Linus Torvalds
2006-05-03  2:55     ` Paul Mackerras
2006-05-03 16:57       ` Linus Torvalds
2006-05-03 23:08         ` Paul Mackerras
2006-05-03 23:25           ` Linus Torvalds [this message]
2006-05-20  0:07         ` Paul Mackerras
2006-05-20 16:42           ` Linus Torvalds
2006-05-21  0:40             ` Paul Mackerras

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.0605031612230.4086@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.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).