Skip to content

Commit 1ea5e46

Browse files
committed
Merge branch 'ab/reverse-midx-optim'
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
2 parents 5639a8d + 8fe8bae commit 1ea5e46

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pack-write.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ const char *write_rev_file(const char *rev_name,
222222
uint32_t i;
223223
const char *ret;
224224

225+
if (!(flags & WRITE_REV) && !(flags & WRITE_REV_VERIFY))
226+
return NULL;
227+
225228
ALLOC_ARRAY(pack_order, nr_objects);
226229
for (i = 0; i < nr_objects; i++)
227230
pack_order[i] = i;

0 commit comments

Comments
 (0)