Re: [PATCH 0/6] easy bulk commit creation in tests
- From
Jeff King <peff@peff.net>
- Date
- Jun 29, 2019, 00:30 UTC
- Message-ID
- <20190629003057.GB3094@sigill.intra.peff.net>
- In-Reply-To
- <nycvar.QRO.7.76.6.1906281452251.44@tvgsbejvaqbjf.bet>
On Fri, Jun 28, 2019 at 02:53:26PM +0200, Johannes Schindelin wrote:
Show 8 quoted lines
> > > It would be nice if we had a "test_commits_bulk" that used fast-import > > > to create larger numbers of commits. > > > > So here's a patch to do that. > > I like the direction, especially because it would make it super easy to go > one step further that would probably make a huge difference on Windows: to > move `test_commit_bulk` to `test-tool commit-bulk`.
I actually considered going directly there, but I don't think it would make a big difference. In the biggest case we dropped 900 processes to 4. If we really want to drop that to 1, we can:
- use a temp-file to avoid the left-hand-pipe subshell
- add a feature to fast-import to say "build on top of ref X", instead
of using to use rev-parse to manually generates a "reset" line
(maybe this is even possible already; I searched for it, but not
very hard). - add a feature to fast-import to have it check out the result of HEAD
if it was updatedThe first one seems like an easy and obvious win that I'll explore. The second one would be useful in general, I think, but I don't plan on digging into it (unless somebody shows up with an easy existing way to do it).
The third one is a little less elegant to me, because there are a lot of questions about how to checkout (e.g., with "-f", what happens to deleted files, etc).
-Peff