git diff timing oddity

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

 



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  >/dev/null

real	0m0.944s
user	0m0.712s
sys	0m0.227s

$ time git diff --stat origin  >/dev/null

real	0m0.944s
user	0m0.712s
sys	0m0.225s

$ time git diff --stat origin HEAD >/dev/null

real	0m0.022s
user	0m0.006s
sys	0m0.012s

$ time git diff --stat origin HEAD >/dev/null

real	0m0.022s
user	0m0.006s
sys	0m0.013s

$ time git diff --stat origin HEAD >/dev/null

real	0m0.023s
user	0m0.006s
sys	0m0.013s

These should be identical commands, so why is the "origin HEAD" form
running an order of magnitude faster?

j.
--
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]