Re: [PATCH v3 7/8] branch.c: use 'ref-filter' APIs
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Aug 22, 2015, 15:51 UTC
- Message-ID
- <CAP8UFD3rXJqB1DEz5LfdM8xxanzoJp6J=weED+FygeZmufG4Sw@mail.gmail.com>
- In-Reply-To
- <1440226309-25415-8-git-send-email-Karthik.188@gmail.com>
On Sat, Aug 22, 2015 at 8:51 AM, Karthik Nayak <karthik.188@gmail.com> wrote:
Show 5 quoted lines
> > The test t1430 'git branch shows badly named ref' has been changed to > check the stderr for the warning regarding the broken ref. This is > done as ref-filter throws a warning for broken refs rather than > directly printing them.
[...]
Show 12 quoted lines
> diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh > index 16d0b8b..db3627e 100755 > --- a/t/t1430-bad-ref-name.sh > +++ b/t/t1430-bad-ref-name.sh > @@ -41,7 +41,7 @@ test_expect_success 'fast-import: fail on invalid branch name "bad[branch]name"' > test_expect_success 'git branch shows badly named ref' ' > cp .git/refs/heads/master .git/refs/heads/broken...ref && > test_when_finished "rm -f .git/refs/heads/broken...ref" && > - git branch >output && > + git branch 2>output && > grep -e "broken\.\.\.ref" output > '
Maybe the test could be renamed to 'git branch warns about badly named ref' and maybe you could also check that "broken\.\.\.ref" is not printed on stdout.
Thanks, Christian.