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
This commit is contained in:
Junio C Hamano 2021-10-12 13:51:45 -07:00
Родитель 62a7648a5e 8fe8bae9d2
Коммит 79c887d29d
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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;