git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* bug report: git add --dry-run does not honor core.ignorecase
@ 2020-10-26 14:31 Rosenbush, David M        Collins
  2021-01-07 15:32 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Rosenbush, David M        Collins @ 2020-10-26 14:31 UTC (permalink / raw)
  To: git@vger.kernel.org

SUMMARY: the git add --dry-run seems to ignore the core.ignorecase configuration setting.

What did you do before the bug happened? (Steps to reproduce your issue)
I started with an empty archive.
The configuration was set: git config core.ignorecase true
The file git_ext.txt, used in the command below, includes multiple specifications including *.ico
I issued the command: git add --dry-run --verbose --pathspec-from-file=git_ext.txt
git reported that no file matched *.ico even though there were files named xxx.ICO
git proceeded no further after the report.
running the git add command without the --dry-run added the xxx.ICO files to the archive

What did you expect to happen? (Expected behavior)
git add --dry-run should have reported that the xxx.ICO files would be added to the archive.

What happened instead? (Actual behavior)
Executing git add with the --dry-run switch should mirror execution without the --dry-run switch.
Both forms should honor the core.ignorecase true configuration, but --dry-run does not.


[System Info]
git version:
git version 2.29.0.windows.1
cpu: x86_64
built from commit: add3cebdf89e93784955b34e1c1ffcba308b89cc
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
uname: Windows 10.0 17763 
compiler info: gnuc: 10.2
libc info: no libc information available
$SHELL (typically, interactive shell): <unset>


David Rosenbush | Staff Engineer, Software
COLLINS AEROSPACE | ISR & Space
One Hamilton Road
Windsor Locks, CT 06096
Tel: (860) 654-5697     cell: (860) 798-9944   Home: (860) 658-7993
David.Rosenbush@collins.com

CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of Collins Aerospace and its affiliated companies. If you are not the intended recipient, please 1) Do not disclose, copy, distribute or use this message or its contents. 2) Advise the sender by return email. 3) Delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug report: git add --dry-run does not honor core.ignorecase
  2020-10-26 14:31 bug report: git add --dry-run does not honor core.ignorecase Rosenbush, David M        Collins
@ 2021-01-07 15:32 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2021-01-07 15:32 UTC (permalink / raw)
  To: Rosenbush, David M        Collins; +Cc: git@vger.kernel.org

Hi David,

On Mon, 26 Oct 2020, Rosenbush, David M        Collins wrote:

> SUMMARY: the git add --dry-run seems to ignore the core.ignorecase configuration setting.

I don't think that is _technically_ true: `git add` takes pathspecs, and
they ignore core.ignoreCase on purpose; Instead, whether pathspecs ignore
case is controlled by `--icase-pathspecs` (see
https://git-scm.com/docs/git#Documentation/git.txt---icase-pathspecs) or
`GIT_ICASE_PATHSPECS`
(https://git-scm.com/docs/git#Documentation/git.txt-codeGITICASEPATHSPECScode).

Ciao,
Johannes

P.S.: A more minimal reproducer is to not even use `--pathspec-from-file`,
but to provide the file name as a command-line argument directly.

>
> What did you do before the bug happened? (Steps to reproduce your issue)
> I started with an empty archive.
> The configuration was set: git config core.ignorecase true
> The file git_ext.txt, used in the command below, includes multiple specifications including *.ico
> I issued the command: git add --dry-run --verbose --pathspec-from-file=git_ext.txt
> git reported that no file matched *.ico even though there were files named xxx.ICO
> git proceeded no further after the report.
> running the git add command without the --dry-run added the xxx.ICO files to the archive
>
> What did you expect to happen? (Expected behavior)
> git add --dry-run should have reported that the xxx.ICO files would be added to the archive.
>
> What happened instead? (Actual behavior)
> Executing git add with the --dry-run switch should mirror execution without the --dry-run switch.
> Both forms should honor the core.ignorecase true configuration, but --dry-run does not.
>
>
> [System Info]
> git version:
> git version 2.29.0.windows.1
> cpu: x86_64
> built from commit: add3cebdf89e93784955b34e1c1ffcba308b89cc
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Windows 10.0 17763
> compiler info: gnuc: 10.2
> libc info: no libc information available
> $SHELL (typically, interactive shell): <unset>
>
>
> David Rosenbush | Staff Engineer, Software
> COLLINS AEROSPACE | ISR & Space
> One Hamilton Road
> Windsor Locks, CT 06096
> Tel: (860) 654-5697     cell: (860) 798-9944   Home: (860) 658-7993
> David.Rosenbush@collins.com
>
> CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of Collins Aerospace and its affiliated companies. If you are not the intended recipient, please 1) Do not disclose, copy, distribute or use this message or its contents. 2) Advise the sender by return email. 3) Delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-07 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 14:31 bug report: git add --dry-run does not honor core.ignorecase Rosenbush, David M        Collins
2021-01-07 15:32 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).