author | Anders Kaseorg <andersk@MIT.EDU> | |
Wed, 27 May 2009 19:23:12 +0000 (15:23 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 May 2009 06:56:19 +0000 (23:56 -0700) | ||
commit | b7dd2d20fad1036ce7da0b635a8bb14cd4230f1a | |
tree | 03de80ea12277743af573f4130192bbc6a4ff185 | tree | snapshot |
parent | e57cb0158209ece040a4b873064504efd7d2ec0e | commit | diff |
for-each-ref: Do not lookup objects when they will not be used
This makes commands such as `git for-each-ref --format='%(refname)'`,
which are used heavily by the bash_completion code, run about 6 times
faster on an uncached repository (3 s intead of 18 s on my linux-2.6
repository with several remotes).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes commands such as `git for-each-ref --format='%(refname)'`,
which are used heavily by the bash_completion code, run about 6 times
faster on an uncached repository (3 s intead of 18 s on my linux-2.6
repository with several remotes).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-for-each-ref.c | diff | blob | history |