]> source.dussan.org Git - jgit.git/commitdiff
cleanup: Reuse local variable for current DirCacheEntry 01/4201/2
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 3 Sep 2011 21:55:11 +0000 (23:55 +0200)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 8 Sep 2011 14:46:19 +0000 (16:46 +0200)
Since we already have assigned i.getDirCacheEntry() to dce,
use dce instead.

Change-Id: I107713ad0b356516d75c29203f945b056bad3ac7
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java

index 85594832920db389258232fbc97b1a6382358e97..f0ca574e3c86b625e4ff48546a93f4f93c95d6a9 100644 (file)
@@ -624,7 +624,7 @@ public class DirCacheCheckout {
                                if (hId.equals(iId)) {
                                        dce = i.getDirCacheEntry();
                                        if (f == null || f.isModified(dce, true))
-                                               conflict(name, i.getDirCacheEntry(), h, m);
+                                               conflict(name, dce, h, m);
                                        else
                                                remove(name);
                                } else
@@ -700,13 +700,13 @@ public class DirCacheCheckout {
                                        if (m==null && walk.isDirectoryFileConflict()) {
                                                if (dce != null
                                                                && (f == null || f.isModified(dce, true)))
-                                                       conflict(name, i.getDirCacheEntry(), h, m);
+                                                       conflict(name, dce, h, m);
                                                else
                                                        remove(name);
                                        } else
-                                               keep(i.getDirCacheEntry());
+                                               keep(dce);
                                } else
-                                       conflict(name, i.getDirCacheEntry(), h, m);
+                                       conflict(name, dce, h, m);
                        } else if (m == null) {
 
                                /**
@@ -722,21 +722,21 @@ public class DirCacheCheckout {
 
                                if (hId.equals(iId)) {
                                        if (f == null || f.isModified(dce, true))
-                                               conflict(name, i.getDirCacheEntry(), h, m);
+                                               conflict(name, dce, h, m);
                                        else
                                                remove(name);
                                } else
-                                       conflict(name, i.getDirCacheEntry(), h, m);
+                                       conflict(name, dce, h, m);
                        } else {
                                if (!hId.equals(mId) && !hId.equals(iId) && !mId.equals(iId))
-                                       conflict(name, i.getDirCacheEntry(), h, m);
+                                       conflict(name, dce, h, m);
                                else if (hId.equals(iId) && !mId.equals(iId)) {
                                        if (dce != null && (f == null || f.isModified(dce, true)))
-                                               conflict(name, i.getDirCacheEntry(), h, m);
+                                               conflict(name, dce, h, m);
                                        else
                                                update(name, mId, m.getEntryFileMode());
                                } else {
-                                       keep(i.getDirCacheEntry());
+                                       keep(dce);
                                }
                        }
                }