All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH] refs: remove lookup cache for reference-transaction hook
Date: Sat, 22 Aug 2020 11:02:34 +0200	[thread overview]
Message-ID: <20200822090234.GC1069@ncase.pks.im> (raw)
In-Reply-To: <20200821172137.GA3261095@coredump.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]

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 <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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-08-22  9:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21  8:29 [PATCH] refs: remove lookup cache for reference-transaction hook Patrick Steinhardt
2020-08-21 14:37 ` Jeff King
2020-08-21 16:42   ` Junio C Hamano
2020-08-21 17:21     ` Jeff King
2020-08-22  9:02       ` Patrick Steinhardt [this message]
2020-08-22  8:59   ` Patrick Steinhardt
2020-08-25 10:35 ` [PATCH v2] " Patrick Steinhardt
2020-08-25 15:10   ` Jeff King
2020-08-25 18:09     ` Junio C Hamano
2020-08-25 18:29       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200822090234.GC1069@ncase.pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.