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

Re: [PATCH] pathspec: die on empty strings as pathspec

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2017, 05:54 UTC
Message-ID
<xmqqfuf82xr5.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170607033308.33550-1-emilyxxie@gmail.com>
Emily Xie <emilyxxie@gmail.com> writes:
Show 14 quoted lines
> diff --git a/t/t3700-add.sh b/t/t3700-add.sh
> index f3a4b4a..40a0d2b 100755
> --- a/t/t3700-add.sh
> +++ b/t/t3700-add.sh
> @@ -331,9 +331,8 @@ test_expect_success 'git add --dry-run --ignore-missing of non-existing file out
>  	test_i18ncmp expect.err actual.err
>  '
>  
> -test_expect_success 'git add empty string should invoke warning' '
> -	git add "" 2>output &&
> -	test_i18ngrep "warning: empty strings" output
> +test_expect_success 'git add empty string should fail' '
> +	test_must_fail git add ""
>  '

Doesn't this affect the tests that follow this step? We used to warn but went ahead and added all of them anyway, but now we fail without adding anything, which means that the state of the index before and after this patch would be different.

>  test_expect_success 'git add --chmod=[+-]x stages correctly' '
Previous: Brandon WilliamsNext: Emily Xie
Message 6 of 12 in “pathspec: die on empty strings as pathspec”
  1. pathspec: die on empty strings as pathspecEmily Xie, Jun 7, 2017
  2. Junio C HamanoJun 9, 2017
  3. Jeff KingJun 10, 2017
  4. Junio C HamanoJun 10, 2017
  5. Brandon WilliamsJun 9, 2017
  6. Junio C HamanoJun 10, 2017
  7. Emily XieJun 23, 2017
  8. Junio C HamanoJun 23, 2017
  9. Junio C HamanoJun 23, 2017
  10. Junio C HamanoJun 23, 2017
  11. Torsten BögershausenJun 23, 2017
  12. Junio C HamanoJun 23, 2017

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.