Re: [PATCH 2/8] p5400: add perf tests for git-receive-pack(1)
- From
Chris Torek <chris.torek@gmail.com>
- Date
- May 20, 2021, 02:09 UTC
- Message-ID
- <CAPx1GveeUi1s6LKTkUYS7CqkyZ9mm=6AQg4Ta8VHi1mnT19gEg@mail.gmail.com>
- In-Reply-To
- <f248b41d6e2df2d34a4304e2655df8cb094483e9.1621451532.git.ps@pks.im>
On Wed, May 19, 2021 at 1:22 PM Patrick Steinhardt <ps@pks.im> wrote:
> We'll the connectivity check logic for git-receive-pack(1) in the
s/the conn/do the conn/
Show 7 quoted lines
> diff --git a/t/perf/p5400-receive-pack.sh b/t/perf/p5400-receive-pack.sh > new file mode 100755 > index 0000000000..2b0c89d977 > --- /dev/null > +++ b/t/perf/p5400-receive-pack.sh > @@ -0,0 +1,74 @@ > +#!/bin/sh
This code is, unfortunately, full of bash-isms:
> + refs=("create updated:new")Plain sh doesn't have arrays...
> + done < <(printf "%s\n" "${refs[@]}")This is another bash-ism.
> +done < <(printf "%s\n" "clone $TARGET_REPO_CLONE" "extrarefs $TARGET_REPO_REFS" "empty $TARGET_REPO_EMPTY")
I think these are mostly easily corrected but the `refs` probably should just be dumped into a file, one line at a time, to be re-read from a file, since `printf ... | while read ...` runs the whole loop inside a subshell.
Chris