kwin commented on code in PR #1370:
URL: https://github.com/apache/maven-scm/pull/1370#discussion_r3371627960
##########
maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/status/JGitStatusCommand.java:
##########
@@ -51,7 +54,11 @@ protected StatusScmResult
executeStatusCommand(ScmProviderRepository repo, ScmFi
git = JGitUtils.openRepo(fileSet.getBasedir());
Status status = git.status().call();
List<ScmFile> changedFiles = getFileStati(status);
-
+ if (!fileSet.getFileList().isEmpty()) {
+ Set<String> fileSetPaths =
+
fileSet.getFileList().stream().map(File::toString).collect(Collectors.toSet());
+ changedFiles.removeIf(scmFile ->
!fileSetPaths.contains(scmFile.getPath()));
Review Comment:
The base directory of the fileSet is not necessarily the root directory of
the working copy, therefore some file adjustments are necessary before
comparing with `changedFiles.path`.
--
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]