* [PATCH GIT] Fix parsing peeled line in packed-ref
@ 2009-03-06 16:02 Daniel Cheng (aka SDiZ)
0 siblings, 0 replies; only message in thread
From: Daniel Cheng (aka SDiZ) @ 2009-03-06 16:02 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Daniel Cheng (aka SDiZ), Daniel Cheng (aka SDiZ)
From: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@sdiz.net>
When doing a WalkTransport with packed-ref, peeled
line are not handled correctly. This patch fix the issue.
Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
---
.../jgit/transport/WalkRemoteObjectDatabase.java | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/WalkRemoteObjectDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/transport/WalkRemoteObjectDatabase.java
index a4f8961..d8e727b 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/WalkRemoteObjectDatabase.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/WalkRemoteObjectDatabase.java
@@ -436,7 +436,7 @@ private void readPackedRefsImpl(final Map<String, Ref> avail,
if (line.charAt(0) == '^') {
if (last == null)
throw new TransportException("Peeled line before ref.");
- final ObjectId id = ObjectId.fromString(line + 1);
+ final ObjectId id = ObjectId.fromString(line.substring(1));
last = new Ref(Ref.Storage.PACKED, last.getName(), last
.getObjectId(), id, true);
avail.put(last.getName(), last);
--
1.6.2.rc2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-06 16:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 16:02 [PATCH GIT] Fix parsing peeled line in packed-ref Daniel Cheng (aka SDiZ)
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).