Open ghost opened 9 years ago
It works on 0.30.0. git bisect told me it was intentional change indeed (introduced in d3a5de43e4c7b8735fede1c). I don't quite get why ag should behave like this, but fix is trivial - revert commit to use strrchr instead of strchr. I can sent PR if @ggreer agrees to accept it.
Ugh, that's my bad on that one. The issue that was fixed was that you couldn't ignore *.min.js
files, because it would just get the .js
, which doesn't match any ignored extension. Now, it's getting .b.htm
, which again doesn't match any extension. It seems like the fix is going to have to be more nuanced than my change :(
As a web developer, not being able to ignore .min.js files means it is completely broken :(
FYI, the workaround for this is to add *.a.htm
or *.*.htm
to your .agignore
.
Why aren't you comparing the entire filename when matching against wildcards? I'm pretty sure that's what git does when parsing .gitignore
@fuzzy76 It's just a bug but there are performance concerns that make the fix a bit complicated. @ggreer mentions it in his blog post: http://geoff.greer.fm/2014/10/13/help-me-get-to-ag-10/
Argh. Kind of amazed to realize that glob matching (e.g. *.min.*
) is "special" in ag
..
I believe this issue was fixed by 221e4c2f070cb69825a42bd43a6bd79e18c0729f
This issue is still not fixed. With current master, if, for example, you have *.min.js
in your .ignore
, then foo.min.js
is skipped, but foo-1.0.min.js
is not. So, jquery-x.y.z.min.js
for example, which is very common, is not skipped.
For those who want a workaround, version 0.28.0 is the last released version that doesn't have this bug.
You can also add a workaround to your .ignore files by using this type of pattern:
*[*\.]js
*[*\.]html
*[*\.]css
Presumably this will continue to work once the fix is in place.
Was this ever fixed ? Doesn't look like so, here is the example of files I have and want git to ignore them: project/settings/internal/com.kms.katalon.execution.properties project/settings/internal/com.kms.katalon.execution.webui.properties project/settings/internal/file1.properties project/settings/internal/file2.properties
At the top of my project directory, I have a .gitignore with only this - and it fails to ignore the first two while file1.properties and file2.properties are dutifully ignored. [.]properties
I'm on git version 2.29.2.windows.2 // ---------------------- Looks like the problem is actually somewhere else: https://github.com/msysgit/git/pull/110
If my
.agignore
file contains:And if I have two files
a.htm
anda.b.htm
, the latter is not ignored by.agignore
.Here's an example:
I found out that using
**.htm
works in this case, but if this is intentional, it is very uninituitive, especially since it does not follow.gitignore
syntax. I'd recommend in this case mentioning this explicitly in https://github.com/ggreer/the_silver_searcher/wiki/Advanced-Usage, which says that: