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

Re: [JGIT] Request for help

From
Nasser Grainawi <nasser@codeaurora.org>
Date
Sep 3, 2009, 21:09 UTC
Message-ID
<4AA0308F.9@codeaurora.org>
In-Reply-To
<20090903194955.GL1033@spearce.org>
Shawn O. Pearce wrote:
Show 17 quoted lines
> Nasser Grainawi <nasser@codeaurora.org> wrote:
>> Shawn O. Pearce wrote:
>>> Hmm, maybe a method on Patch is reasonable.
>> Going down this route, I'd add a few things to Patch.
>> patchId would be a private field (of type ObjectId?)
>> getPatchId would be a public method that returns patchId
>> and then likely a private method (computePatchId?) that actually  
>> generates the patchId
> 
> Sure, but getPatchId can compute it on demand on the first call,
> and anyone who modifies the Patch would just need to clear out
> the cached patchId value so the next call (if it ever comes) to
> getPatchId would force it to recompute.
> 
> Most users of Patch won't want the patchId, so there is no reason
> to compute it.
> 

Works for me, that's even easier. I'll get to work on implementing this, but between (re-)learning Java and our legal dept, don't know when I'll have a finished product to share...

I'll continue to post questions as I get them. Thanks everyone for their help thus far :)

Previous: Shawn O. Pearce
Message 28 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.