Reputation: 2904
The python .gitinore provided by GitHub has the following regex,
*,cover
on line 49.
What exactly does this regex mean? Is it, "anything, then a comma, then the word cover
"?
Upvotes: 1
Views: 585
Reputation: 5613
I have also seen this as *.py,cover
to ignore files created by the AnnotateReporter of Coverage.py that have the file extension .py,cover
- the comma is not a typo here and also not part of the wildcard syntax, it's just a literal comma.
Upvotes: 2
Reputation: 986
It was a typo. Fixed now with following PR.
https://github.com/github/gitignore/pull/2379
Upvotes: 1
Reputation: 16547
It's not a regex, but a wildcard. In regex (regular expressions), *
means "repeated as many times as you want", and comes as a postfix operator. In wildcards, *
means, as you guessed, "anything".
Upvotes: 2