Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 448094 - Triple negation in nested ignore rules is not working
Summary: Triple negation in nested ignore rules is not working
Status: CLOSED DUPLICATE of bug 407475
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 407643 (view as bug list)
Depends on: 407475
Blocks:
  Show dependency tree
 
Reported: 2014-10-21 10:42 EDT by Andrey Loskutov CLA
Modified: 2014-11-28 19:16 EST (History)
2 users (show)

See Also:


Attachments
Example project with git repository (1.52 KB, application/zip)
2014-10-21 10:42 EDT, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2014-10-21 10:42:16 EDT
Created attachment 248052 [details]
Example project with git repository

jgit can't handle "triple" negation of nested ignore rules.

Consider this layout:

root contains .gitignore:
*.o
d

Directory c has c/.gitignore:
!d

This mean: 
- ignore all *.o files
- also ignore all files from "d" directories
- in the "c" directory revert the last rule and don't ignore "d". Still, *.o rule is valid in c/d.

c/d/hello.o file is shown as untracked by jgit, but as ignored by CLI git.

This is *not* a duplicate of 407475.
I have a patch.
Comment 1 Andrey Loskutov CLA 2014-10-22 03:32:54 EDT
Possible patch: https://git.eclipse.org/r/35295
Comment 2 Andrey Loskutov CLA 2014-10-22 09:17:15 EDT
The fix for this bug also fixes bug 407475.

*** This bug has been marked as a duplicate of bug 407475 ***
Comment 3 Michal Rus CLA 2014-10-22 09:21:38 EDT
*** Bug 407643 has been marked as a duplicate of this bug. ***