Re: [PATCH v2 5/5] remote-curl: use post_rpc() for protocol v2 also
On Fri, Feb 22, 2019 at 8:18 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 17 quoted lines
> On Thu, Feb 21, 2019 at 3:25 PM Jonathan Tan <jonathantanmy@google.com> wrote:
> > + for i in $(test_seq 1 1500)
> > + do
> > + # do not use here-doc, because it requires a process
> > + # per loop iteration
> > + echo "commit refs/heads/too-many-refs-$i" &&
> > + echo "committer git <git@example.com> $i +0000" &&
> > + echo "data 0" &&
> > + echo "M 644 inline bla.txt" &&
> > + echo "data 4" &&
> > + echo "bla"
> > + done | git -C "$HTTPD_DOCUMENT_ROOT_PATH/big" fast-import &&
>
> Although not outright wrong, maintaining an &&-chain in the loop body
> is a bit misleading here for a couple reasons. First, without "|| exit
> 1" at the end of the body, neither the loop nor the test itself will
> abort early if some command within the body fails. [...]
I meant "|| return 1", not "|| exit 1".
> By the way, I see that this same script already contains a couple
> tests with loops neglecting the trailing "|| exit 1", hence they too
> fail to abort early if something goes wrong inside the body [...]