On Fri, Aug 21, 2020 at 01:21:37PM -0400, Jeff King wrote: > On Fri, Aug 21, 2020 at 09:42:45AM -0700, Junio C Hamano wrote: > > > Jeff King writes: > > > > > However, I wondered... > > > > > >> +test_perf "nonatomic push" ' > > >> + git push ./target-repo.git branch-{1..1000} && > > >> + git push --delete ./target-repo.git branch-{1..1000} > > >> +' > > > > Is this a bash-and-ksh-only test? At least, the above would not try > > to push 1000 branches with the version of dash I have. I didn't realize it's shell-specific behaviour, thanks for highlighting. > Heh, I was so focused on the "push" part of it that I didn't even look > carefully at the second half of the command-line. ;) > > I think pushing "refs/heads/branch-*" would work for pushing. For > deletion, though, I don't think we allow wildcards in the refspecs. > You could abuse pruning: > > git push --prune ../dst.git refs/heads/does-not-exist/*:refs/heads/* > > It also may be OK to just omit that half of the test. I think the > initial push exercises the case we care about. Though I guess we do run > the test repeatedly, so we might have to do: > > rm -rf dst.git && > git init dst.git && > git push dst.git refs/heads/branch-* I'm not too keen to use `rm -rf && git init` as it muddies the subject under test a bit. I'll try to come up with a non-shell-specific version of this on Monday. Patrick