aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitrii Filippov <dmfilippov@google.com>2022-08-01 18:43:43 +0200
committerDmitrii Filippov <dmfilippov@google.com>2022-08-01 13:31:07 -0400
commitf8e229d56956276d92f9e9edb73659a84517cf2b (patch)
tree3cc7c2def4dd4660ed7bd95072eaf6c70a26137d
parente030b106c574acf2d0feaee0a9e900d0763d6ee2 (diff)
downloadjgit-f8e229d56956276d92f9e9edb73659a84517cf2b.tar.gz
jgit-f8e229d56956276d92f9e9edb73659a84517cf2b.zip
Rename fastMinHasMatch to allTreesNamesMatchFastMinRef
Change-Id: I2d9165616650e9d44745c6848d2cf1045f53f33c
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
index 3c8553c74f..8085dfaa24 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
@@ -56,7 +56,7 @@ import org.eclipse.jgit.lib.Repository;
public class NameConflictTreeWalk extends TreeWalk {
private static final int TREE_MODE = FileMode.TREE.getBits();
- private boolean fastMinHasMatch;
+ private boolean allTreesNamesMatchFastMinRef;
private AbstractTreeIterator dfConflict;
@@ -97,7 +97,7 @@ public class NameConflictTreeWalk extends TreeWalk {
AbstractTreeIterator min() throws CorruptObjectException {
for (;;) {
final AbstractTreeIterator minRef = fastMin();
- if (fastMinHasMatch)
+ if (allTreesNamesMatchFastMinRef)
return minRef;
if (isTree(minRef)) {
@@ -118,7 +118,7 @@ public class NameConflictTreeWalk extends TreeWalk {
}
private AbstractTreeIterator fastMin() {
- fastMinHasMatch = true;
+ allTreesNamesMatchFastMinRef = true;
int i = 0;
AbstractTreeIterator minRef = trees[i];
@@ -136,7 +136,7 @@ public class NameConflictTreeWalk extends TreeWalk {
final int cmp = t.pathCompare(minRef);
if (cmp < 0) {
- if (fastMinHasMatch && isTree(minRef) && !isTree(t)
+ if (allTreesNamesMatchFastMinRef && isTree(minRef) && !isTree(t)
&& nameEqual(minRef, t)) {
// We used to be at a tree, but now we are at a file
// with the same name. Allow the file to match the
@@ -145,7 +145,7 @@ public class NameConflictTreeWalk extends TreeWalk {
t.matches = minRef;
hasConflict = true;
} else {
- fastMinHasMatch = false;
+ allTreesNamesMatchFastMinRef = false;
t.matches = t;
minRef = t;
}
@@ -153,7 +153,7 @@ public class NameConflictTreeWalk extends TreeWalk {
// Exact name/mode match is best.
//
t.matches = minRef;
- } else if (fastMinHasMatch && isTree(t) && !isTree(minRef)
+ } else if (allTreesNamesMatchFastMinRef && isTree(t) && !isTree(minRef)
&& !isGitlink(minRef) && nameEqual(t, minRef)) {
// The minimum is a file (non-tree) but the next entry
// of this iterator is a tree whose name matches our file.
@@ -172,10 +172,10 @@ public class NameConflictTreeWalk extends TreeWalk {
minRef = t;
hasConflict = true;
} else
- fastMinHasMatch = false;
+ allTreesNamesMatchFastMinRef = false;
}
- if (hasConflict && fastMinHasMatch && dfConflict == null)
+ if (hasConflict && allTreesNamesMatchFastMinRef && dfConflict == null)
dfConflict = minRef;
return minRef;
}