mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: cleanup - unify argument order
GitOrigin-RevId: 0234c16d34323f8cea6aa6f985cfbfe5e810e40a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1fd6e39155
commit
e7ba63eaeb
@@ -233,12 +233,12 @@ public class VcsDirtyScopeImpl extends VcsModifiableDirtyScope {
|
||||
|
||||
private static boolean hasAncestor(@NotNull Set<? extends FilePath> dirs, @NotNull FilePath filePath) {
|
||||
for (FilePath parent : dirs) {
|
||||
if (isAncestor(filePath, parent)) return true;
|
||||
if (isAncestor(parent, filePath)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isAncestor(@NotNull FilePath filePath, @NotNull FilePath parent) {
|
||||
private static boolean isAncestor(@NotNull FilePath parent, @NotNull FilePath filePath) {
|
||||
return FileUtil.startsWith(filePath.getPath(), parent.getPath());
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public class VcsDirtyScopeImpl extends VcsModifiableDirtyScope {
|
||||
if (files != null) {
|
||||
for (Iterator<FilePath> it = files.iterator(); it.hasNext();) {
|
||||
FilePath oldBoy = it.next();
|
||||
if (isAncestor(oldBoy, newcomer)) {
|
||||
if (isAncestor(newcomer, oldBoy)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
@@ -283,11 +283,11 @@ public class VcsDirtyScopeImpl extends VcsModifiableDirtyScope {
|
||||
else {
|
||||
for (Iterator<FilePath> it = dirsByRoot.iterator(); it.hasNext();) {
|
||||
FilePath oldBoy = it.next();
|
||||
if (isAncestor(newcomer, oldBoy)) {
|
||||
if (isAncestor(oldBoy, newcomer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAncestor(oldBoy, newcomer)) {
|
||||
if (isAncestor(newcomer, oldBoy)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user