{"thread":{"id":"43192","subject":"EGIT unpackedreadr problem","startedAt":"2006-12-03T01:00:13Z","lastAt":"2006-12-03T02:25:13Z","messageCount":2,"participants":["Robin Rosenberg","Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"294009","messageId":"200612030200.13857.robin.rosenberg@dewire.com","threadId":"43192","inReplyTo":null,"subject":"EGIT unpackedreadr problem","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2006-12-03T01:00:13Z","receivedAt":"2006-12-03T01:00:13Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Subject: [PATCH] Utility to show a log.\n\nThis program shows commit information for a commit.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\nThe main reason for this patch is not the program itself. The new code to\nread really fast but doesn't always work.\n\nTry the supplied program. I get no parents and the treeid \nis wrong. An interesting thing is that if you look in the debugger the author \nand commit messag is actually correct. Only the tree id and parent are wrong. \nNot sure what's going on. The  UnpackedReader \"looks\" like it does\nthe equivalent of what it did before,but apparently it isn't. \n\nReading commits from packs works fine. It's the unpacked reader that's bad.\n\n-- robin\n \n# java -Xmx100m -cp /home/me/SW/EGIT/org.spearce.jgit/bin org.spearce.jgit.pgm.Log c1ad80df56ff5f9d945eac8ac905b8009de30081\ncommit c1ad80df56ff5f9d945eac8ac905b8009de30081\ntree 7ba4b782c23bb35b0cb7dbc46cfc09a6e887e19d\nauthor PersonIdent[Shawn O. Pearce, spearce@spearce.org, Wed Nov 29 21:02:45 CET 2006]\n\nMisc. code formatting cleanups.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n\n# git cat-file -p c1ad80df56ff5f9d945eac8ac905b8009de30081\ntree a7ba4b7f1824763f182b6d45288e52fceece3c65b\nparent 82c23bb35b0cb7dbc46cfc09a6e887e19dfb20f9\nauthor Shawn O. Pearce <spearce@spearce.org> 1164830576 -0500\ncommitter Shawn O. Pearce <spearce@spearce.org> 1164830576 -0500\n\nMisc. code formatting cleanups.\n[...]\n\n org.spearce.jgit/src/org/spearce/jgit/pgm/Log.java |   23 ++++++++++++++++++++\n 1 files changed, 23 insertions(+), 0 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/pgm/Log.java b/org.spearce.jgit/src/org/spearce/jgit/pgm/Log.java\nnew file mode 100644\nindex 0000000..9598792\n--- /dev/null\n+++ b/org.spearce.jgit/src/org/spearce/jgit/pgm/Log.java\n@@ -0,0 +1,23 @@\n+    package org.spearce.jgit.pgm;\n+    \n+    import java.io.File;\n+    import java.io.IOException;\n+import java.util.Iterator;\n+\n+import org.spearce.jgit.lib.Commit;\n+import org.spearce.jgit.lib.Repository;\n+    \n+    public class Log {\n+        public static void main(String[] args) throws IOException {\n+            Repository db = new Repository(new File(\".git\"));\t\n+            Commit commit = db.mapCommit(args[0]);\n+            System.out.println(\"commit \"+commit.getCommitId());\n+            System.out.println(\"tree \"+commit.getTreeId());\n+            for (Iterator ci=commit.getParentIds().iterator(); ci.hasNext(); ) {\n+                System.out.println(\"parent \"+ci.next());\n+            }\n+            System.out.println(\"author \"+commit.getAuthor());\n+            System.out.println();\n+            System.out.println(commit.getMessage());\n+        }\n+    }\n-- \n1.4.4.gf05d\n"},{"id":"297430","messageId":"20061203022513.GB26668@spearce.org","threadId":"43192","inReplyTo":"200612030200.13857.robin.rosenberg@dewire.com","subject":"Re: EGIT unpackedreadr problem","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-12-03T02:25:13Z","receivedAt":"2006-12-03T02:25:13Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Robin Rosenberg <robin.rosenberg@dewire.com> wrote:\n> Subject: [PATCH] Utility to show a log.\n\nThanks.  This is somewhat handy so I've applied the utility program.\n\nLike your other patch to Commit class this one had some whitespace\nissues.  In the future could you apply the Eclipse formatter (using\nthe Java Conventions style) to the source before genererating a diff?\n \n> Not sure what's going on. The  UnpackedReader \"looks\" like it does\n> the equivalent of what it did before,but apparently it isn't. \n\nYea...  I broke the legacy header parsing in 42691339.\nThe breakage actually showed up in one of the unit tests\n(test009_CreateCommitOldFormat) but I didn't notice it before\npushing the changes out as I failed to run the entire unit test\nsuite first.  Whoops.\n\nI found it and fixed it in f70704f9.  The issue was we were copying\nthe remaining data from the Inflater ontop of the data we had\nalready decompressed out for the header; this meant that we lost the\nleading bytes of each object.  I just neglated to push the fix out.\nDouble whoops.\n\n-- \n"}]}