slachiewicz opened a new issue, #1459: URL: https://github.com/apache/maven-scm/issues/1459
With `includes` set, the file set is built by scanning the disk (`ScmFileSet(basedir, includes, excludes)` calls `FileUtils.getFiles`), so a tracked file deleted on disk is not in `getFileList()`. The gitexe status consumer then drops every status entry that is not in that list (`GitStatusConsumer`, `isFileNameInFileList`), so the deletion is not reported. Reproduction with maven-scm-plugin 2.2.1: a git repository with tracked `a.txt` and `b.txt`; `rm a.txt` (no `git rm`); then `mvn org.apache.maven.plugins:maven-scm-plugin:2.2.1:check-local-modification -Dincludes='a.txt,b.txt'` (or `'*.txt'`) ends with BUILD SUCCESS. Without `includes`, or with `-Dincludes=a.txt` (which matches no existing file, so the list is empty and the filter is skipped), the same repository fails with "The build will stop as there is local modifications". Expected: a deletion of a file that matches `includes` is reported. A fix needs to match the status paths against the include and exclude patterns instead of the scanned file list. #1370 adds the same list-based filter to the JGit provider, with the same limitation. -- 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]
