Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326180 - EGit does not ignore "foldername/" correct in .gitignore
Summary: EGit does not ignore "foldername/" correct in .gitignore
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major with 1 vote (vote)
Target Milestone: 0.11-M1   Edit
Assignee: Marc Strapetz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-24 13:55 EDT by Janosch CLA
Modified: 2011-01-07 13:13 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janosch CLA 2010-09-24 13:55:06 EDT
Build Identifier: 20100617-1415

If you put "foldername/" in your .gitignore file, egit should ignore all directories named "foldername", no matter where they appear in the folder tree. 

For Example if your folder structure looks like this:

root_folder/
 + folder/
      + subfolder/

and you have a .gitignore file in root_folder containing the line "subfolder/", then subfolder should be ignored. Git does that on the command line, EGit does not. Egit shows the folder and its contents still as "untracked" and indicates this with a tiny questionmark.

Reproducible: Always

Steps to Reproduce:
1. Create a directory and a subdir and a subdir within this subdir.
2. Create a .gitignore file in your root dir. Add "dirname/" of the innermost subdir to your .gitignore
3. If you do a commit, all files within this subdir are listed as "untracked"
Comment 1 Jens Baumgart CLA 2010-11-08 04:44:44 EST
- works if the full path is specified in .gitignore: /root_folder/folder/subfolder
- seems to be a problem in WorkingTreeIterator.isEntryIgnored
Comment 2 Chris Aniszczyk CLA 2010-11-08 04:52:00 EST
We should probably come up with a test case for this in JGit and have it fail.
Comment 3 Chris Aniszczyk CLA 2011-01-07 13:13:47 EST
Looks to be fixed with c87ae94c70158ba2bcb310aa242102853d221f11.