git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git 2.34.0: Behavior of `**` in gitignore is different from previous versions.
@ 2021-11-18 16:41 Danial Alihosseini
  2021-11-18 17:04 ` Jeff King
  0 siblings, 1 reply; 13+ messages in thread
From: Danial Alihosseini @ 2021-11-18 16:41 UTC (permalink / raw)
  To: git

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
Consider the following project structure
- data
  - data1
    - file1
    - file1.txt
  - data2
    - file2
    - file2.txt
- .gitignore


`.gitignore` is as follows:
```
data/**
!data/**/
!data/**/*.txt
```
What did you expect to happen? (Expected behavior)

I expect all files in `data` folder to be ignored except `.txt` files.

What happened instead? (Actual behavior)

`file1` and `file2` are not ignored.
Here is the `check-ignore` output:
```
$ git check-ignore -v data/data1/file1
.gitignore:2:!/data/**/ data/data1/file1
```

What's different between what you expected and what actually happened?
It seems that the behavior of `**` in gitignore is different from
previous versions.

Anything else you want to add:

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.34.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.15.2-arch1-1
compiler info: gnuc: 11.1
libc info: glibc: 2.33
$SHELL (typically, interactive shell): /usr/bin/zsh


[Enabled Hooks]

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

end of thread, other threads:[~2021-11-23 21:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 16:41 git 2.34.0: Behavior of `**` in gitignore is different from previous versions Danial Alihosseini
2021-11-18 17:04 ` Jeff King
2021-11-18 22:09   ` Derrick Stolee
2021-11-19  4:01     ` Danial Alihosseini
2021-11-19 14:51       ` Derrick Stolee
2021-11-19 17:06         ` Danial Alihosseini
2021-11-19 20:05         ` Johannes Sixt
2021-11-19 20:33           ` Derrick Stolee
2021-11-19 20:57             ` Ævar Arnfjörð Bjarmason
2021-11-20 22:41             ` Chris Torek
2021-11-21  0:46               ` Junio C Hamano
2021-11-23 12:21                 ` Philip Oakley
2021-11-23 21:13                   ` Danial Alihosseini

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).