git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] refs: remove lookup cache for reference-transaction hook

From
Jeff King <peff@peff.net>
Date
Aug 21, 2020, 17:21 UTC
Message-ID
<20200821172137.GA3261095@coredump.intra.peff.net>
In-Reply-To
<xmqqeeo09chm.fsf@gitster.c.googlers.com>
On Fri, Aug 21, 2020 at 09:42:45AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> 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.

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-*
-Peff
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 4 of 10 in “refs: remove lookup cache for reference-transaction hook”
  1. refs: remove lookup cache for reference-transaction hookPatrick Steinhardt, Aug 21, 2020
  2. Jeff KingAug 21, 2020
  3. Junio C HamanoAug 21, 2020
  4. Jeff KingAug 21, 2020
  5. Patrick SteinhardtAug 22, 2020
  6. Patrick SteinhardtAug 22, 2020
  7. refs: remove lookup cache for reference-transaction hookPatrick Steinhardt, Aug 25, 2020
  8. Jeff KingAug 25, 2020
  9. Junio C HamanoAug 25, 2020
  10. Jeff KingAug 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.