git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT] Request for help

From
Nasser Grainawi <nasser@codeaurora.org>
Date
Sep 2, 2009, 23:28 UTC
Message-ID
<4A9EFFB1.9090501@codeaurora.org>
Hello all,

I'm looking to add 'git patch-id' to JGit and I could use a few pointers. I'm not very familiar with the JGit code base or Java, so please excuse any blatant oversights or unintelligent questions.

First off, is there a "hacking JGit" document anywhere? One of those would be great right now.

So far I'm just trying to define the inputs and outputs. On Shawn's suggestion I'm planning on making it part of the org.spearce.jgit.patch package. C Git patch-id very generically has an input of a 'patch', so I'm thinking this implementation should use the Patch object. Looking at that class it seems that has everything patch-id should need, so perhaps that's the only input.

As far as output, C Git patch-id has the special feature to output the commit-id along with the patch-id when it gets input in the format of git-diff-tree. Should JGit do the same or just return the patch-id? I don't know that this question even makes sense in the context of JGit (since the commit-id is almost certainly available elsewhere and someone calling 'getPatchId()' is likely only interested in the patch-id).

Should PatchId be a class on its own, or just a method within the Patch class?

Thanks, Nasser

Next: Johannes Schindelin
Message 1 of 28 in “[JGIT] Request for help”
  1. Nasser GrainawiSep 2, 2009
  2. Johannes SchindelinSep 3, 2009
  3. Shawn O. PearceSep 3, 2009
  4. jgit diff, was Re: [JGIT] Request for helpJohannes Schindelin, Sep 3, 2009
  5. 0/5 jgit diffJohannes Schindelin, Sep 3, 2009
  6. 1/5 Add set to IntListJohannes Schindelin, Sep 3, 2009
  7. 2/5 Add Myers' algorithm to generate diff scriptsJohannes Schindelin, Sep 3, 2009
  8. 3/5 Add a test class for Myers' diff algorithmJohannes Schindelin, Sep 3, 2009
  9. 4/5 Prepare RawText for diff-index and diff-filesJohannes Schindelin, Sep 3, 2009
  10. 5/5 Add the "jgit diff" commandJohannes Schindelin, Sep 3, 2009
  11. Johannes SchindelinSep 3, 2009
  12. Shawn O. PearceOct 1, 2009
  13. Johannes SchindelinOct 1, 2009
  14. Christian HalstrickSep 3, 2009
  15. Jonas FonsecaSep 3, 2009
  16. Shawn O. PearceSep 3, 2009
  17. Jonas FonsecaSep 3, 2009
  18. Shawn O. PearceSep 3, 2009
  19. Gabe McArthurSep 4, 2009
  20. Mark StrubergSep 4, 2009
  21. Jonas FonsecaSep 4, 2009
  22. Mark StrubergSep 4, 2009
  23. Jonas FonsecaSep 4, 2009
  24. Mark StrubergSep 4, 2009
  25. Shawn O. PearceSep 3, 2009
  26. Nasser GrainawiSep 3, 2009
  27. Shawn O. PearceSep 3, 2009
  28. Nasser GrainawiSep 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.