From 2bb8da040578d98b4d1c4ee3c1287e115a36efa3 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sat, 3 Sep 2011 23:55:11 +0200 Subject: cleanup: Reuse local variable for current DirCacheEntry Since we already have assigned i.getDirCacheEntry() to dce, use dce instead. Change-Id: I107713ad0b356516d75c29203f945b056bad3ac7 Signed-off-by: Robin Rosenberg --- .../org/eclipse/jgit/dircache/DirCacheCheckout.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 8559483292..f0ca574e3c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -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); } } } -- cgit v1.2.3