Taylor Blau <me@xxxxxxxxxxxx> writes: > ++ /* > ++ * order packs by descending mtime so that objects are laid out > ++ * roughly as newest-to-oldest > ++ */ > + if (a->mtime < b->mtime) > + return 1; > ++ else if (b->mtime < a->mtime) > ++ return -1; > + else > + return 0; I think this strategy makes sense when this repack using this new feature is run for the first time in a repository that acquired many packs over time. I am not sure what happens after the feature is used a few times---it won't always be the newest sets of packs that will be rewritten, but sometimes older ones are also coalesced, and when that happens the resulting pack that consists primarily of older objects would end up having a more recent timestamp, no? Even then, I do agree that newer to older would be beneficial most of the time, so this is of course not an objection against this particular sort order.