Claudenw commented on code in PR #746:
URL: https://github.com/apache/creadur-rat/pull/746#discussion_r4370182709
##########
apache-rat-core/src/main/java/org/apache/rat/config/exclusion/fileprocessors/GitIgnoreBuilder.java:
##########
@@ -147,16 +147,23 @@ protected Optional<String> modifyEntry(final
Consumer<MatcherSet> matcherSetCons
/**
* The global gitignore file to process, based on the
- * {@link EnvVar#RAT_NO_GIT_GLOBAL_IGNORE},
- * {@link EnvVar#XDG_CONFIG_HOME} and
- * {@link EnvVar#HOME} environment
+ * {@link EnvVar#RAT_NO_GIT_GLOBAL_IGNORE}, the git configuration
+ * ({@code core.excludesFile} including {@code [include] path} directives)
+ * and the {@link EnvVar#XDG_CONFIG_HOME} and {@link EnvVar#HOME}
environment
* variables.
*/
protected Optional<File> globalGitIgnore() {
if (EnvVar.RAT_NO_GIT_GLOBAL_IGNORE.isSet()) {
return Optional.empty();
}
+ Optional<File> fromConfig = new GitConfig().coreExcludesFile();
Review Comment:
Sorry, this got lost in my email swamp.
My understanding is that the git ignore process is re-evaluated by git on
every .gitignore. I would expect the relative file to be evaluated against the
directory with the .gitignore. but I don't know of that is actually how git
evaluates hence the test with the command line git ignore call to verify we get
the same answer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]