summaryrefslogtreecommitdiff
path: root/builtin/describe.c
diff options
context:
space:
mode:
authorBen Peart <benpeart@microsoft.com>2018-11-05 19:27:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-06 03:49:59 (GMT)
commit6c5b7f55a845bccf7b3abda92a78c621898d838d (patch)
tree351a429fc3c5fb096884ec834a96029938ccc41d /builtin/describe.c
parent99ce720c338ebeb37331bd98f724569837c74d0d (diff)
downloadgit-6c5b7f55a845bccf7b3abda92a78c621898d838d.zip
git-6c5b7f55a845bccf7b3abda92a78c621898d838d.tar.gz
git-6c5b7f55a845bccf7b3abda92a78c621898d838d.tar.bz2
refresh_index: remove unnecessary calls to preload_index()
With refresh_index() learning to utilize preload_index() to speed up its operation there is no longer any benefit to having the caller preload the index first. Remove those unneeded calls by calling read_index() instead of the preload variant. There is no measurable performance impact of this patch - the 2nd call to preload_index() bails out quickly but there is no reason to call it twice. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/describe.c')
-rw-r--r--builtin/describe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index c48c34e..cc11844 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -629,7 +629,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
struct argv_array args = ARGV_ARRAY_INIT;
int fd, result;
- read_cache_preload(NULL);
+ read_cache();
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED,
NULL, NULL, NULL);
fd = hold_locked_index(&index_lock, 0);