Re: [PATCH v3 7/8] branch.c: use 'ref-filter' APIs
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Aug 22, 2015, 17:50 UTC
- Message-ID
- <CAOLa=ZSwU94-JgAdw-xoL5mDNVL8nsbuBCD-MhN3H+m1gFD9gQ@mail.gmail.com>
- In-Reply-To
- <CAP8UFD3rXJqB1DEz5LfdM8xxanzoJp6J=weED+FygeZmufG4Sw@mail.gmail.com>
On Sat, Aug 22, 2015 at 9:21 PM, Christian Couder <christian.couder@gmail.com> wrote:
Show 26 quoted lines
> On Sat, Aug 22, 2015 at 8:51 AM, Karthik Nayak <karthik.188@gmail.com> wrote: >> >> 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. > > [...] > >> 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. >
The name change sounds reasonable, do we really need to check for it in the stdout?
-- Regards, Karthik Nayak