DESCRIPTION

Add IgnoredResources class for a more thorough check of whether a file is ignored. Second attempt to push, first one ended up pushing multiple changes.

I put a detailed explanation into a comment on Eclipse Bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303925

Changed if-statement in IgnoreAction to call IgnoredResources.

Change-Id: I5c40e237275f2d9031b2b56591ba98c5ce166008


COMMENTS

author: Douglas Trujillo
date: 2010-03-03 23:40:34.000000000

Patch Set 1: I would prefer that you didn't submit this; Unclean IP, do not check in

I appreciate that you start working on this topic, there are several problems with your change:
- license header and copyright are missing in new source file
- commit message should properly describe the "why" about this change
- explanations for reviewers should go in gerrit cover message
- implementation isn't compliant with http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
in what steps do you want to reach compatibility ?

Line:1, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> license header and copyright statement are missing

Line:21, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> we don't xxx@xxx.xxx tags

Line:28, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> s/ignored it appears/ignored if it appears/

Line:34, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> We also have to respect patterns read from the file specified by the configuration variable core.excludesfile (see http://www.kernel.org/pub/software/scm/git/docs/gitignore.html ).

Line:38, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> why do we need this method ?

Line:48, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> According to http://www.kernel.org/pub/software/scm/git/docs/gitignore.html .gitignore files can exist in any hierarchy level of the repository.
Also precedence has to be properly taken into account.

Line:64, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/IgnoredResources.java -> This isn't interoperable with native git and breaks http://www.kernel.org/pub/software/scm/git/docs/gitignore.html .
Patterns are not regular expressions but shell globs as specified in the gitignore help.

-------------------------------------
author: Douglas Trujillo
date: 2010-03-03 23:40:44.000000000

Patch Set 1:

I appreciate that you start working on this topic, there are several problems with your change:
- license header and copyright are missing in new source file
- commit message should properly describe the "why" about this change
- explanations for reviewers should go in gerrit cover message
- implementation isn't compliant with http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
in what steps do you want to reach compatibility ?

-------------------------------------
author: Reese Nunez
date: 2010-03-04 14:53:20.000000000

Patch Set 1: No score

Hi,

    * license header and copyright are missing in new source file

I will add these 

    * commit message should properly describe the "why" about this change
Sure -- is it all right if I use the blurb from the bugzilla bug?

    * explanations for reviewers should go in gerrit cover message

Just to clarify -- is the 'gerrit cover' message a comment on the gerrit site, or part of the commit?

    * implementation isn't compliant with http://www.kernel.org/pub/software/scm/git/docs/gitignore.html

I'll do some work on the special rules and try to extend the glob --> Java Regex translation to more than a couple of .replace() calls. I wasn't sure if this was a change EGit needed/wanted, so I held off on the extra details for now -- sorry!

    * in what steps do you want to reach compatibility ?
I'm not sure what you mean? 
Compatibility with .gitignore specs? Ideally it should be fully capable of interpreting anything users manually place into their .gitignore file, including special rules (negation, directory-only, etc.) and globbing. There's a Java nio class for direct glob conversion (PathMatcher), I've just done some basic translations for now.

Compatibility with the rest of EGit -- would just involve replacing the 2 calls to Team.isIgnoredHint with calls to the new class. It should be fully backwards compatible with anything EGit has been doing with .gitignore

-------------------------------------
author: Douglas Trujillo
date: 2010-03-04 22:46:27.000000000

Patch Set 1:

-- is it all right if I use the blurb from the bugzilla bug?

yes, I think so

-- is the 'gerrit cover' message a comment on the gerrit site, or part of the commit?

I meant the message you are seeing here (label in gerrit is "Cover Message")

 * implementation isn't compliant with http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
-- I'll do some work on the special rules and try to extend the glob --> Java Regex translation to more than a couple of .replace() calls. I wasn't sure if this was a change EGit needed/wanted

great

    * in what steps do you want to reach compatibility ?
I'm not sure what you mean? 
Compatibility with .gitignore specs? Ideally it should be fully capable of interpreting anything users manually place into their .gitignore file, including special rules (negation, directory-only, etc.) and globbing. There's a Java nio class for direct glob conversion (PathMatcher), I've just done some basic translations for now.

exactly, that's what I meant.

-------------------------------------
