Re: [PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 16, 2014, 19:37 UTC
- Message-ID
- <CAPig+cQyrTT6Ejrg_e2HveJGrn6qCnRWPBuJZKY91b+SzO6vPw@mail.gmail.com>
- In-Reply-To
- <1418755747-22506-6-git-send-email-sbeller@google.com>
On Tue, Dec 16, 2014 at 1:49 PM, Stefan Beller <sbeller@google.com> wrote:
Show 21 quoted lines
> This adds tests for the atomic push option. > The first four tests check if the atomic option works in > good conditions and the last three patches check if the atomic > option prevents any change to be pushed if just one ref cannot > be updated. > > Signed-off-by: Stefan Beller <sbeller@google.com> > --- > diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh > new file mode 100755 > index 0000000..6354fc0 > --- /dev/null > +++ b/t/t5543-atomic-push.sh > @@ -0,0 +1,176 @@ > +#!/bin/sh > + > +test_description='pushing to a repository using the atomic push option' > + > +. ./test-lib.sh > + > +D=`pwd`
Junio already mentioned this previously, but this should be $(pwd) rather than `pwd`.
However, more importantly, why is this variable declared at all since it is never used by the script?
Show 6 quoted lines
> +mk_repo_pair () {
> + rm -rf workbench upstream &&
> + test_create_repo upstream &&
> + test_create_repo workbench &&
> + (
> + cd upstream && git config receive.denyCurrentBranch warnThis would be slightly easier to read if split over two lines.
> + ) && > + ( > + cd workbench && git remote add up ../upstream
Ditto.
> + ) > +} > +