From: Jeff King Date: Sun, 05 Sep 2021 12:49:14 GMT Subject: Re: [hacky PATCH 0/2] speeding up trivial for-each-ref invocations Message-ID: In-Reply-To: On Sun, Sep 05, 2021 at 04:19:53PM +0800, ZheNing Hu wrote: > > In this version there are 2 patches, tested against 'git for-each-ref > > --format="%(objectname) %(refname)"' on a fully packed repo with 500k > > refs: > > > > Regarding this 500k refs, is there any way I can reproduce it? Try this in a clone of linux.git (or any other repo): git rev-list HEAD | head -500000 | perl -lne 'print "create refs/foo/$. $_"' | git update-ref --stdin git pack-refs --all --prune Though I actually think for these tests that it is not important that each ref point to a unique commit (we are not opening up the objects at all, and just treating the oids as strings). -Peff