EGIT packed delta format reading

4 messages, 2 authors, 2016-06-15 · open the first message on its own page

EGIT packed delta format reading

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:42:35

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] Fixes to packed delta format reading.

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:42:36

From: Robin Rosenberg <redacted>


---

 .../src/org/spearce/jgit/lib/PatchDeltaStream.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
index 808e854..11a7679 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
@@ -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.

From: Shawn Pearce <hidden>
Date: 2016-06-15 22:42:36

quoted hunk
---

 .../src/org/spearce/jgit/lib/PatchDeltaStream.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
index 808e854..11a7679 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PatchDeltaStream.java
@@ -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;
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.

-- 
Shawn.

Re: EGIT packed delta format reading

From: Shawn Pearce <hidden>
Date: 2016-06-15 22:42:36

Robin Rosenberg [off-list ref] wrote:
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.
 
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...

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help