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

[JGIT] patch-id

From
Nasser Grainawi <nasser@codeaurora.org>
Date
Sep 28, 2009, 22:21 UTC
Message-ID
<4AC136CC.8040300@codeaurora.org>
Hello again,

I'm trying to add a public getPatchId method to the jgit Patch class and I came up with some questions. Shawn previously mentioned that Patch already does the parsing of the patch; however, I can't quite wrap my head around how/where/if data from that parsing is stored.

It seems Patch does some statistical number gathering, but at no point does it store a 'slimmed-down' version of a patch. I had the idea to just iterate over the FileHeader's and get the byte buffer of each, but I don't think those buffers have the parsed data.

If I've mis-read the code (quite possible), someone please let me know. Short of that, suggestions for how to go about acquiring/storing a parsed representation of the data with maximal existing code re-use would be appreciated.

Thanks, Nasser

Next: Shawn O. Pearce
Message 1 of 2 in “[JGIT] patch-id”
  1. Nasser GrainawiSep 28, 2009
  2. Shawn O. PearceOct 8, 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.