Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-12 23:51:45 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-12 23:51:45 +0300
commit79c887d29d8cd780ab19b844b031884840f25a02 (patch)
tree189ecf20b78db2ced6ed28493fc266720c36b041
parent62a7648a5e0968c25bd7a0b9ff9103f920c19a8d (diff)
parent8fe8bae9d28e2b02ceb482ab89ea88bb20556f1d (diff)
Merge branch 'ab/reverse-midx-optim' into maint
The code that optionally creates the *.rev reverse index file has been optimized to avoid needless computation when it is not writing the file out. * ab/reverse-midx-optim: pack-write: skip *.rev work when not writing *.rev
-rw-r--r--pack-write.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pack-write.c b/pack-write.c
index 2767b78619..067054f097 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -222,6 +222,9 @@ const char *write_rev_file(const char *rev_name,
uint32_t i;
const char *ret;
+ if (!(flags & WRITE_REV) && !(flags & WRITE_REV_VERIFY))
+ return NULL;
+
ALLOC_ARRAY(pack_order, nr_objects);
for (i = 0; i < nr_objects; i++)
pack_order[i] = i;