Re: gitk highlight feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]