DORMANTno replies

[JGIT PATCH] Update Index (refresh) doesn't do anything obvious

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:46:58
Subsystem: the rest · Maintainer: Linus Torvalds

The bug reported against EGit is reall an JGit bug and
is quite easy to fix, which is why I do it rather than drop
the GitIndex usage and replace with DirCache.

Signed-off-by: Robin Rosenberg <redacted>
---
 .../src/org/spearce/jgit/lib/GitIndex.java         |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java b/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java
index 21b495a..6484535 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java
@@ -468,7 +468,7 @@ public boolean update(File f) throws IOException {
 			if (modified) {
 				size = (int) f.length();
 				ObjectWriter writer = new ObjectWriter(db);
-				ObjectId newsha1 = sha1 = writer.writeBlob(f);
+				ObjectId newsha1 = writer.writeBlob(f);
 				if (!newsha1.equals(sha1))
 					modified = true;
 				sha1 = newsha1;
@@ -491,7 +491,7 @@ public boolean update(File f, byte[] newContent) throws IOException {
 			boolean modified = false;
 			size = newContent.length;
 			ObjectWriter writer = new ObjectWriter(db);
-			ObjectId newsha1 = sha1 = writer.writeBlob(newContent);
+			ObjectId newsha1 = writer.writeBlob(newContent);
 			if (!newsha1.equals(sha1))
 				modified = true;
 			sha1 = newsha1;
-- 
1.6.3.2.199.g7340d
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help