From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org, git@vger.kernel.org
Cc: Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [JGIT PATCH] Update Index (refresh) doesn't do anything obvious
Date: Mon, 22 Jun 2009 21:27:09 +0200 [thread overview]
Message-ID: <1245698829-28347-1-git-send-email-robin.rosenberg@dewire.com> (raw)
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
reply other threads:[~2009-06-22 19:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245698829-28347-1-git-send-email-robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).