{"thread":{"id":"19904","subject":"[JGIT PATCH] Update Index (refresh) doesn't do anything obvious","startedAt":"2009-06-22T19:27:09Z","lastAt":"2009-06-22T19:27:09Z","messageCount":1,"participants":["Robin Rosenberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"116785","messageId":"1245698829-28347-1-git-send-email-robin.rosenberg@dewire.com","threadId":"19904","inReplyTo":null,"subject":"[JGIT PATCH] Update Index (refresh) doesn't do anything obvious","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2009-06-22T19:27:09Z","receivedAt":"2009-06-22T19:27:09Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"The bug reported against EGit is reall an JGit bug and\nis quite easy to fix, which is why I do it rather than drop\nthe GitIndex usage and replace with DirCache.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n .../src/org/spearce/jgit/lib/GitIndex.java         |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java b/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java\nindex 21b495a..6484535 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java\n@@ -468,7 +468,7 @@ public boolean update(File f) throws IOException {\n \t\t\tif (modified) {\n \t\t\t\tsize = (int) f.length();\n \t\t\t\tObjectWriter writer = new ObjectWriter(db);\n-\t\t\t\tObjectId newsha1 = sha1 = writer.writeBlob(f);\n+\t\t\t\tObjectId newsha1 = writer.writeBlob(f);\n \t\t\t\tif (!newsha1.equals(sha1))\n \t\t\t\t\tmodified = true;\n \t\t\t\tsha1 = newsha1;\n@@ -491,7 +491,7 @@ public boolean update(File f, byte[] newContent) throws IOException {\n \t\t\tboolean modified = false;\n \t\t\tsize = newContent.length;\n \t\t\tObjectWriter writer = new ObjectWriter(db);\n-\t\t\tObjectId newsha1 = sha1 = writer.writeBlob(newContent);\n+\t\t\tObjectId newsha1 = writer.writeBlob(newContent);\n \t\t\tif (!newsha1.equals(sha1))\n \t\t\t\tmodified = true;\n \t\t\tsha1 = newsha1;\n-- \n1.6.3.2.199.g7340d\n"}]}