New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking of ignored files showing false positives. #310
Comments
I noticed very similar behaviour across several projects. In one case, my project root (directory!) is being detected as being tracked and ignored at the same time by the plugin. Obviously, my project root directory is not included in .gitignore. |
@akomelj Thank you for your report! When displaying those kind of informations, I'm depending on the following git command:
performed in each Git root directory. Can you plase execute this command in your git roots and provide me the output to help on the issue investigation? |
|
Interesting, I thought I'd try something quickly - and apparently its all git's fault. If I edit my .gitignore I can avoid this issue... Previously:
Edited, I end up with this:
Previously the Avoid line was placed before the *.jar line So the order is apparently very important (Hope that makes sense) |
The provided command does not list HWE directory (supposedly ignored & tracked):
.gitignore in the root of Git repo and in HWE project directory (direct descendant of the root of Git repo) also does not list HWE as excluded:
Since my project root HWE is not in the root of Git repo - is it possible that your plugin processes Git output and wants to display descendants of HWE which are not listed and displays only empty project root directory as a result? |
before press "add unversioned files": https://habrastorage.org/files/559/1e1/17a/5591e117a1374d34a56f4718a670e38b.png command "git ls-files --ignored --exclude-standard" no output UPD: I think that the plug-in sees the files and directories that are created IDEA for internal needs and then removed. the problem is probably in IDEA virtual file system |
@SUPERCILEX I had the exact same match coming up. |
@HeadOnAPlate Thanks for the tip! |
I've seen this problem elsewhere: toptal/gitignore.io#178 It does appear that order matters in the .gitignore file. Is there a way we could separate the exclusions from templates and include them at the end of the file, maybe after some marker where newly added templates would be placed? Or maybe have the inclusive portion of templates added to the top of the file and exclusionary portions of templates added to the end? |
I'm experiencing false positives on several projects where the plugin is reporting that it found files which are tracked in Git but are listed in .gitignore, yet the "list of commands to be performed with untrack operation" is empty, and |
@rscorer @akomelj @bamapookie @SUPERCILEX @HeadOnAPlate @bamapookie @pbienick I finally was able to resolve this issue (mostly with reimplementing the indexing part). The main issue that caused this bug was wrongly handled files excluding with This fix will be released with v2.0.0 as soon as I'll take care of the other issues (I'm back on track for last 2 weeks). |
Received notice that
Ignored files found that are tracked: .ignore plugin found some files that are tracked with Git which are also listed in .gitignore file.
However, the file being highlighted is gradle-wrapper.jar which is in my .gitignore file as this:
Earlier I also noticed that
log4j2.properties
file which is in my build folder was similarly being marked. It is of course included in git in the main project, and my build folder is added to .gitignore, so this rule seems a little confused.The text was updated successfully, but these errors were encountered: