EGIT packed delta format reading
Hi,
I deciced to take Shawns Eclipse plugin for a run. There was some problem reading the pack files that seemed to work after applying the following fixes, i.e. I could connect to the project and the interal structures looks ok in the debugger as far as I can tell, but decorations don't work. That's as far as I've been testing up to now.
BTW. How should EGIT patches be formatted to distingish them from git patches? I'm sending this using StGit.
-- robin
PATCH 1/1 Fixes to packed delta format reading.
From: Robin Rosenberg <[email protected]>
---
.../src/org/spearce/jgit/lib/PatchDeltaStream.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java +2 -2
@@ -105,7 +105,7 @@ public class PatchDeltaStream extends In + " load delta base for patching."); } shift += n; - expBaseLen += n; + expBaseLen -= n; } } finally
@@ -269,7 +269,7 @@ public class PatchDeltaStream extends In throws IOException { int r; - while ((r = read(buf, o, len)) > 0) + while ((r = deltaStream.read(buf, o, len)) > 0) { o += r; len -= r;
Re: [PATCH] Fixes to packed delta format reading.
Quoted 19 lines
---
.../src/org/spearce/jgit/lib/PatchDeltaStream.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java +1
-1@@ -105,7 +105,7 @@ public class PatchDeltaStream extends In + " load delta base for patching."); } shift += n; - expBaseLen += n; + expBaseLen -= n; } } finally
org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java public class PatchDeltaStream extends In · line 275
Quoted 8 lines
org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java +1
-1@@ -269,7 +269,7 @@ public class PatchDeltaStream extends In throws IOException { int r; - while ((r = read(buf, o, len)) > 0) + while ((r = deltaStream.read(buf, o, len)) > 0) { o += r; len -= r;
Thanks. I actually found these Friday night when I started reviewing the code to double check its compliance with A Large Angry SCM's file format documentation. These were already made locally but I didn't push them out to my web repository yet. I'll do that shortly.
Signature · 1 line
Shawn.
Quoted 8 lines · Robin Rosenberg
Hi,
I deciced to take Shawns Eclipse plugin for a run. There was some problem reading the pack files that seemed to work after applying the following fixes, i.e. I could connect to the project and the interal structures looks ok in the debugger as far as I can tell, but decorations don't work. That's as far as I've been testing up to now.
I'll take a look at it again, as soon as I get the tree entry sorting fixed.
Quoted 2 lines
BTW. How should EGIT patches be formatted to distingish them from git patches? I'm sending this using StGit.
You can use StGit to send patches, or any other GIT based tool. After all, we're using GIT. :-)
As far as marking patches specifically as an egit/jgit patch you can send them directly to me and CC: the mailing list. The egit/jgit file names are pretty distinctive, just as the core GIT and Cogito file names are. I doubt folks will get confused as to which project a patch belongs to...
Signature · 1 line
Shawn.