Re: git diff timing oddity

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

 



On Thu, May 06, 2010 at 01:04:18AM -0400, Jay Soffian wrote:

> git version 1.7.1, Mac OS X 10.6.3, largish repo (42K files, 35K
> commits, well packed ~ 1GB). Difference between origin and HEAD is a
> single commit.
> 
> $ time git diff --stat origin  >/dev/null
> 
> real	0m0.942s
> user	0m0.713s
> sys	0m0.223s
>
> [...]
>
> $ time git diff --stat origin HEAD >/dev/null
> 
> real	0m0.022s
> user	0m0.006s
> sys	0m0.012s
>
> [...]
> 
> These should be identical commands, so why is the "origin HEAD" form
> running an order of magnitude faster?

Isn't "git diff --stat origin" comparing against the working tree?

-Peff
--
To unsubscribe from this list: 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]