Re: [PATCH v4 7/7] tests: order arguments to git-rev-list properly
- From
Matthew DeVore <matvore@google.com>
- Date
- Oct 3, 2018, 16:33 UTC
- Message-ID
- <CAMfpvhKyFrYVk53Z5-qkicj5eZWT6B_JBXijPDOazKqaCia9_Q@mail.gmail.com>
- In-Reply-To
- <bc2b3ec030650c107bd07c63f48bd874bf5f1085.1538581868.git.matvore@google.com>
On Wed, Oct 3, 2018 at 9:26 AM Matthew DeVore <matvore@google.com> wrote:
> > - git -C pc1 rev-list HEAD --quiet --objects --missing=print >revs && > + git -C pc1 rev-list --quiet --objects --missing=print >revs HEAD && > awk -f print_1.awk revs |
...
Show 6 quoted lines
> git -C pc1 blame origin/master -- file.1.txt >observed.blame && > test_cmp expect.blame observed.blame && > - git -C pc1 rev-list master..origin/master --quiet --objects --missing=print >observed && > + git -C pc1 rev-list --quiet --objects --missing=print >observed \ > + master..origin/master && > test_line_count = 0 observed
I screwed up by putting the positional argument *after* the redirection. Sorry for the mix-up. This is interestingly syntactically valid, though bad stylistically. Here is an inter-diff:
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh index eeedd1623..6ff614692 100755 --- a/t/t5616-partial-clone.sh +++ b/t/t5616-partial-clone.sh @@ -35,7 +35,7 @@ test_expect_success 'setup bare clone for server' ' test_expect_success 'do partial clone 1' ' git clone --no-checkout --filter=blob:none "file://$(pwd)/srv.bare" pc1 && - git -C pc1 rev-list --quiet --objects --missing=print >revs HEAD && + git -C pc1 rev-list --quiet --objects --missing=print HEAD >revs && awk -f print_1.awk revs | sed "s/?//" | sort >observed.oids && @@ -93,8 +93,8 @@ test_expect_success 'verify diff causes dynamic object fetch' ' test_expect_success 'verify blame causes dynamic object fetch' ' git -C pc1 blame origin/master -- file.1.txt >observed.blame && test_cmp expect.blame observed.blame && - git -C pc1 rev-list --quiet --objects --missing=print >observed \ - master..origin/master && + git -C pc1 rev-list --quiet --objects --missing=print \ + master..origin/master >observed && test_line_count = 0 observed '