Bug 407643 - .gitignore: Ignore all but files of certain extension.
Summary: .gitignore: Ignore all but files of certain extension.
Status: CLOSED DUPLICATE of bug 448094
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 407475
  Show dependency tree
 
Reported: 2013-05-09 09:01 EDT by Michal Rus CLA
Modified: 2014-11-28 19:17 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***