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

Re: git can't add ignored file if GIT_ICASE_PATHSPECS=1

From
Giuseppe Crino' <giuscri@gmail.com>
Date
Feb 12, 2019, 17:27 UTC
Message-ID
<20190212172708.GA506@evil.localdomain>
In-Reply-To
<20190212171952.GA343@evil.localdomain>
I forgot to mention that the issue is present both in maint and in the master branch.
On Tue, Feb 12, 2019 at 06:19:52PM +0100, Giuseppe Crino' wrote:
Show 25 quoted lines
> To reproduce, apply the attached patch and run at the project root
> 
> 	cd t && ./t3700-add.sh --verbose-only=13 --debug --immediate
> 
> Relevant part of the output is
> 
> 	expecting success:
> 		export GIT_ICASE_PATHSPECS=1 &&
> 		touch a.if &&
> 		test_must_fail git add a.?? &&
> 		! (git ls-files | grep "\\.ig") &&
> 		(git ls-files | grep a.if)
> 
> 	fatal: pathspec 'a.ig' did not match any files
> 	not ok 13 - error out when attempting to add ignored ones but add others
> 	#
> 	#               export GIT_ICASE_PATHSPECS=1 &&
> 	#               touch a.if &&
> 	#               test_must_fail git add a.?? &&
> 	#               ! (git ls-files | grep "\\.ig") &&
> 	#               (git ls-files | grep a.if)
> 
> As I understand this, it's a bug.
> 
> Giuseppe
Show 12 quoted lines
> diff --git a/t/t3700-add.sh b/t/t3700-add.sh
> index 37729ba258..62557e6a3d 100755
> --- a/t/t3700-add.sh
> +++ b/t/t3700-add.sh
> @@ -91,6 +91,7 @@ test_expect_success 'error out when attempting to add ignored ones without -f' '
>  '
> 
>  test_expect_success 'error out when attempting to add ignored ones but add others' '
> +       export GIT_ICASE_PATHSPECS=1 &&
>         touch a.if &&
>         test_must_fail git add a.?? &&
>         ! (git ls-files | grep "\\.ig") &&
Previous: Giuseppe Crino'
Message 2 of 2 in “git can't add ignored file if GIT_ICASE_PATHSPECS=1”
  1. Giuseppe Crino'Feb 12, 2019
  2. Giuseppe Crino'Feb 12, 2019

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.