From: Jeff King Date: Thu, 05 Oct 2017 08:42:50 GMT Subject: Re: [PATCH v2 1/5] test-list-objects: List a subset of object ids Message-ID: <20171005084249.sdkimglkxqh2vi4i@sigill.intra.peff.net> In-Reply-To: <20170925095452.66833-2-dstolee@microsoft.com> On Mon, Sep 25, 2017 at 05:54:48AM -0400, Derrick Stolee wrote: > Create test-list-objects helper program to output a random sample of > OIDs present in the repo. > > If no command line arguments are provided, all OIDs are output. This is weirdly specific. Can we accomplish the same thing with existing tools? E.g., could: git cat-file --batch-all-objects --batch-check='%(objectname)' | shuffle | head -n 100 do the same thing? I know that "shuffle" isn't available everywhere, but I'd much rather see us fill in portability gaps in a general way, rather than introducing one-shot C code that needs to be maintained (and you wouldn't _think_ that t/helper programs need much maintenance, but try perusing "git log t/helper" output; they have to adapt to the same tree-wide changes as the rest of the code). -Peff