Issues with gitattributes pattern matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

after reading though [1] and [2] again, I believe a pattern in .gitattributes like

    */src/*/assets/**/*-expected-* text eol=lf

should match a committed file at

    reporter/src/funTest/assets/NPM-is-windows-1.0.2-expected-NOTICE

In other words, "**" should be able to match "nothing", but it doesn't seem to do in my case.

To cross-check, assuming that ls-files supports the same patterns, running

    git ls-files "*/src/*/assets/**/*-expected-*"

indeed does not list the committed file at

    reporter/src/funTest/assets/NPM-is-windows-1.0.2-expected-NOTICE

for me. Tested with Git 2.20 on Windows and Git 2.19.2 on Linux. Is it a documentation error or a bug in Git?

[1] https://git-scm.com/docs/gitattributes
[2] https://git-scm.com/docs/gitignore#_pattern_format

--
Sebastian Schuberth




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux