git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Karthik NayakNext: Karthik Nayak
Message 9 of 13 in “port the filtering part of ref-filter to branch.c”
  1. 0/8 port the filtering part of ref-filter to branch.cKarthik Nayak, Aug 22, 2015
  2. 1/8 branch: refactor width computationKarthik Nayak, Aug 22, 2015
  3. 2/8 branch: bump get_head_description() to the topKarthik Nayak, Aug 22, 2015
  4. 3/8 branch: roll show_detached HEAD into regular ref_listKarthik Nayak, Aug 22, 2015
  5. 4/8 branch: move 'current' check down to the presentation layerKarthik Nayak, Aug 22, 2015
  6. 5/8 branch: drop non-commit error reportingKarthik Nayak, Aug 22, 2015
  7. 6/8 branch.c: use 'ref-filter' data structuresKarthik Nayak, Aug 22, 2015
  8. 7/8 branch.c: use 'ref-filter' APIsKarthik Nayak, Aug 22, 2015
  9. Christian CouderAug 22, 2015
  10. Karthik NayakAug 22, 2015
  11. Junio C HamanoAug 24, 2015
  12. Karthik NayakAug 24, 2015
  13. 8/8 branch: add '--points-at' optionKarthik Nayak, Aug 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.