From: Jonathan Tan Date: Thu, 24 Jan 2019 21:38:06 GMT Subject: Re: [PATCH v3 7/9] multi-pack-index: prepare 'repack' subcommand Message-ID: <20190124213806.179907-1-jonathantanmy@google.com> In-Reply-To: > Thanks for the suggestion. > > It is slightly wrong, in that we don't sort by size. Instead we sort by > modified time. That makes is a little complicated, but I'll give it > another shot using your framing: > >         Create a new pack-file containing objects in small pack-files >         referenced by the multi-pack-index. Select the pack-files by >         examining packs from oldest-to-newest, adding a pack if its >         size is below the batch size. Stop adding packs when the sum >         of sizes of the added packs is above the batch size. If the >         total size does not reach the batch size, then do nothing. >         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. Thanks, this looks good.