Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9b0eedc
fixup! trace2:data: add trace2 data to midx
derrickstolee May 28, 2019
977b8d2
fixup! midx: use more structured data for expire
derrickstolee May 28, 2019
41f66ab
fixup! midx: implement midx_repack()
derrickstolee May 28, 2019
c7b7cc1
fixup! multi-pack-index: prepare 'repack' subcommand
derrickstolee May 28, 2019
8c71b66
fixup! multi-pack-index: implement 'expire' verb
derrickstolee May 28, 2019
e030d95
fixup! midx: refactor permutation logic
derrickstolee May 28, 2019
cfbfebb
fixup! multi-pack-index: prepare for 'expire' subcommand
derrickstolee May 28, 2019
60d768c
fixup! Docs: rearrange subcommands for multi-pack-index
derrickstolee May 28, 2019
46d0d43
fixup! repack: refactor pack deletion for future use
derrickstolee May 28, 2019
9a3b6c2
repack: refactor pack deletion for future use
derrickstolee Dec 17, 2018
8f4ee71
Docs: rearrange subcommands for multi-pack-index
derrickstolee Dec 21, 2018
52be979
multi-pack-index: prepare for 'expire' subcommand
derrickstolee Dec 5, 2018
63c4119
midx: simplify computation of pack name lengths
derrickstolee Jan 7, 2019
1740e29
midx: refactor permutation logic and pack sorting
derrickstolee Jan 7, 2019
95591fd
multi-pack-index: implement 'expire' subcommand
derrickstolee Dec 5, 2018
2227d0b
multi-pack-index: prepare 'repack' subcommand
derrickstolee Dec 5, 2018
9c813bf
midx: implement midx_repack()
derrickstolee Dec 5, 2018
e70962a
multi-pack-index: test expire while adding packs
derrickstolee Jan 8, 2019
58feee0
midx: add test that 'expire' respects .keep files
derrickstolee Jan 24, 2019
cd63d19
t5319-multi-pack-index.sh: test batch size zero
derrickstolee Apr 24, 2019
9ab635d
trace2:data: add trace2 data to midx
jeffhostetler Mar 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions Documentation/git-multi-pack-index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,21 @@ expire::
afterward to remove all references to these pack-files.

repack::
Collect a batch of pack-files whose size are all at most the
size given by --batch-size, but whose sizes sum to larger
than --batch-size. The batch is selected by greedily adding
small pack-files starting with the oldest pack-files that fit
the size. Create a new pack-file containing the objects the
multi-pack-index indexes into those pack-files, and rewrite
the multi-pack-index to contain that pack-file. A later run
of 'git multi-pack-index expire' will delete the pack-files
that were part of this batch.
Create a new pack-file containing objects in small pack-files
referenced by the multi-pack-index. If the size given by the
`--batch-size=<size>` argument is zero, then create a pack
containing all objects referenced by the multi-pack-index. For
a non-zero batch size, Select the pack-files by examining packs
from oldest-to-newest, computing the "expected size" by counting
the number of objects in the pack referenced by the
multi-pack-index, then divide by the total number of objects in
the pack and multiply by the pack size. We select packs with
expected size below the batch size until the set of packs have
total expected size at least the batch size. If the total size
does not reach the batch size, then do nothing. If a new pack-
file is created, rewrite the multi-pack-index to reference the
new pack-file. A later run of 'git multi-pack-index expire' will
delete the pack-files that were part of this batch.


EXAMPLES
Expand Down
4 changes: 2 additions & 2 deletions builtin/multi-pack-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int cmd_multi_pack_index(int argc, const char **argv,
if (!strcmp(argv[0], "repack"))
return midx_repack(the_repository, opts.object_dir, (size_t)opts.batch_size);
if (opts.batch_size)
die(_("--batch-size option is only for 'repack' verb"));
die(_("--batch-size option is only for 'repack' subcommand"));

if (!strcmp(argv[0], "write"))
return write_midx_file(opts.object_dir);
Expand All @@ -58,5 +58,5 @@ int cmd_multi_pack_index(int argc, const char **argv,
if (!strcmp(argv[0], "expire"))
return expire_midx_packs(the_repository, opts.object_dir);

die(_("unrecognized verb: %s"), argv[0]);
die(_("unrecognized subcommand: %s"), argv[0]);
}
Loading