On 12/22/2019 4:32 AM, Jeff King wrote: > When we perform a diff to get the set of changed paths for a commit, > we initialize a full "struct rev_info" with setup_revisions(). But the > only part of it we use is the diff_options struct. Besides being overly > complex, this also leaks memory, as we use the fake argv to > setup_revisions() create a pending array which is never cleared. > > Let's just use diff_options directly. This reduces the peak heap usage > of "git commit-graph write --changed-paths" on linux.git from ~4GB to > ~1.2GB. In my testing, this went from ~6gb to ~4gb. I'm guessing that my memory difference is related to how poorly my packs are repacked/redeltified. Thanks, -Stolee