git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGIT PATCH] Update Index (refresh) doesn't do anything obvious
@ 2009-06-22 19:27 Robin Rosenberg
  0 siblings, 0 replies; only message in thread
From: Robin Rosenberg @ 2009-06-22 19:27 UTC (permalink / raw)
  To: spearce, git; +Cc: Robin Rosenberg

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 <robin.rosenberg@dewire.com>
---
 .../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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-22 19:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 19:27 [JGIT PATCH] Update Index (refresh) doesn't do anything obvious Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).