Re: [PATCH 2/8] p5400: add perf tests for git-receive-pack(1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 19, 2021 at 1:22 PM Patrick Steinhardt <ps@xxxxxx> wrote:
> We'll the connectivity check logic for git-receive-pack(1) in the

s/the conn/do the conn/

> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux