CHE-3271: Fix Git commit action (#3679)

6.19.x
Igor Vinokur 2017-01-12 14:19:28 +02:00 committed by GitHub
parent f7ca10c86a
commit f3294f72ed
2 changed files with 5 additions and 6 deletions

View File

@ -347,7 +347,9 @@ public class GitServiceClientImpl implements GitServiceClient {
List<String> paths = new ArrayList<>(files.length);
for (Path file : files) {
paths.add(file.isEmpty() ? "." : file.toString());
if (!file.isEmpty()) {
paths.add(file.toString());
}
}
CommitRequest commitRequest = dtoFactory.createDto(CommitRequest.class)

View File

@ -131,10 +131,7 @@ public class CommitPresenter implements CommitView.ActionDelegate {
for (int i = 0; i < resources.length; i++) {
checkState(project.getLocation().isPrefixOf(resources[i].getLocation()));
final Path tmpPath = resources[i].getLocation().removeFirstSegments(project.getLocation().segmentCount());
paths[i] = tmpPath.isEmpty() ? tmpPath.append(".") : tmpPath;
paths[i] = resources[i].getLocation().removeFirstSegments(project.getLocation().segmentCount());
}
return paths;
@ -148,7 +145,7 @@ public class CommitPresenter implements CommitView.ActionDelegate {
project.getLocation(),
message,
addAll,
commitAll ? new Path[]{Path.valueOf(".")} : toRelativePaths(resources),
commitAll ? new Path[]{} : toRelativePaths(resources),
amend)
.then(new Operation<Revision>() {
@Override