You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per https://git-scm.com/docs/gitignore#_pattern_format, if you have a .gitignore pattern that does not contain a slash at the start or in the middle, then it matches recursively in any sub-directory relative the .gitignore dirname:
Examples:
foo.js matches ./foo.js and ./bar/foo.js
foo/ matches ./foo/ and ./bar/foo/
/foo.js only matches ./foo.js
foo/bar.js only matches ./foo/bar.js
However, currently when using the [relative] tag, globs are rewritten simply by prepending the dirname of the .gitignore, e.g.:
foo.js becomes relative/path/foo.js
This is incorrect, because it converts recursive patterns into non-recursive ones. I think patterns without a slash at the start or middle should instead be re-written using a **:
foo.js becomes relative/path/**/foo.js
foo/ becomes relative/path/**/foo/
/foo.js becomes relative/path/foo.js
foo/bar.js becomes relative/path/foo/bar.js
The text was updated successfully, but these errors were encountered:
Per https://git-scm.com/docs/gitignore#_pattern_format, if you have a
.gitignore
pattern that does not contain a slash at the start or in the middle, then it matches recursively in any sub-directory relative the.gitignore
dirname:Examples:
foo.js
matches./foo.js
and./bar/foo.js
foo/
matches./foo/
and./bar/foo/
/foo.js
only matches./foo.js
foo/bar.js
only matches./foo/bar.js
However, currently when using the
[relative]
tag, globs are rewritten simply by prepending the dirname of the.gitignore
, e.g.:foo.js
becomesrelative/path/foo.js
This is incorrect, because it converts recursive patterns into non-recursive ones. I think patterns without a slash at the start or middle should instead be re-written using a
**
:foo.js
becomesrelative/path/**/foo.js
foo/
becomesrelative/path/**/foo/
/foo.js
becomesrelative/path/foo.js
foo/bar.js
becomesrelative/path/foo/bar.js
The text was updated successfully, but these errors were encountered: