Commit b7dd2d2
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent e57cb01 commit b7dd2d2
1 file changed
+17
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | 564 | | |
573 | 565 | | |
574 | 566 | | |
| |||
621 | 613 | | |
622 | 614 | | |
623 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
624 | 632 | | |
625 | 633 | | |
626 | 634 | | |
| |||
926 | 934 | | |
927 | 935 | | |
928 | 936 | | |
929 | | - | |
| 937 | + | |
930 | 938 | | |
931 | 939 | | |
932 | 940 | | |
| |||
0 commit comments