mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] changed and moved paths are mutually exclusive
This commit is contained in:
+4
-2
@@ -66,8 +66,10 @@ public class VcsChangesLazilyParsedDetails extends VcsCommitMetadataImpl impleme
|
||||
public Collection<String> getModifiedPaths() {
|
||||
Set<String> changedPaths = ContainerUtil.newHashSet();
|
||||
for (Change change : getChanges()) {
|
||||
if (change.getAfterRevision() != null) changedPaths.add(change.getAfterRevision().getFile().getPath());
|
||||
if (change.getBeforeRevision() != null) changedPaths.add(change.getBeforeRevision().getFile().getPath());
|
||||
if (!change.getType().equals(Change.Type.MOVED)) {
|
||||
if (change.getAfterRevision() != null) changedPaths.add(change.getAfterRevision().getFile().getPath());
|
||||
if (change.getBeforeRevision() != null) changedPaths.add(change.getBeforeRevision().getFile().getPath());
|
||||
}
|
||||
}
|
||||
return changedPaths;
|
||||
}
|
||||
|
||||
@@ -58,10 +58,8 @@ public final class GitCommit extends VcsChangesLazilyParsedDetails {
|
||||
if (data != null) {
|
||||
Set<String> changes = ContainerUtil.newHashSet();
|
||||
for (GitLogStatusInfo status : ((MyChangesComputable)myChangesGetter).getMergedChanges()) {
|
||||
changes.add(absolutePath(status.getFirstPath()));
|
||||
String secondPath = status.getSecondPath();
|
||||
if (secondPath != null) {
|
||||
changes.add(absolutePath(secondPath));
|
||||
if (status.getSecondPath() == null) {
|
||||
changes.add(absolutePath(status.getFirstPath()));
|
||||
}
|
||||
}
|
||||
return changes;
|
||||
|
||||
Reference in New Issue
Block a user