Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 407643

Summary: .gitignore: Ignore all but files of certain extension.
Product: [Technology] JGit Reporter: Michal Rus <m>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: loskutov, m, matthias.sohn, robin
Version: 3.0Keywords: helpwanted
Target Milestone: 3.6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 407475    

Description Michal Rus CLA 2013-05-09 09:01:24 EDT
I have the following .gitignore file:

*
!*.java
!*/

It should ignore everything but the *.java files in current directory and its subdirectories.

And it certainly ignores every file (but the ones matching *.java) in .gitignore's directory.

However, it also "unignores" all files in subdirectories, regardless of extension. 

This .gitignore file works as expected using command-line git.
Comment 1 Andrey Loskutov CLA 2014-10-22 09:20:45 EDT
Actually this is another reincarnation of bug 448094.

@Michael, can you please mark it as duplicate of 448094 (use "status" field below "comment" field). I can't do that because I have not enough rights.
Comment 2 Michal Rus CLA 2014-10-22 09:21:38 EDT
Done. =)

*** This bug has been marked as a duplicate of bug 448094 ***