[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