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

Re: JGIT: discuss: diff/patch implementation

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 11, 2008, 17:13 UTC
Message-ID
<20081111171342.GJ2932@spearce.org>
In-Reply-To
<491933DF.3060307@dawes.za.net>
Rogan Dawes <lists@dawes.za.net> wrote:
Show 9 quoted lines
> Francis Galiegue wrote:
>>
>> For this to be doable from within the Eclipse Git plugin, a diff/patch  
>> implementation needs to be found, in a license compatible with the 
>> current JGit license (3-clause BSD, as far as I can tell). Or a new 
>> implementation can be rewritten from scratch, of course.
>
> Shouldn't Eclipse already *have* a diff/patch implementation, for its  
> other "team work" plugins?
Err, uhm, sort of.

Eclipse has patch available as an internal API, but it is exposed in the UI for any team provider (or no team provider at all) to use to apply patches to a project in the workspace.

The team provider API assumes the VCS implementation has its own diff, and therefore the diff implementation inside Eclipse is only used for the native Compare view

I've dug around that part of the text compare plugin and its mostly internal APIs, and mostly still low-level LCS generation from arbitrary object input. It doesn't seem well suited to producing fast diffs of text.

Its under the EPL. We could take the code and simplify it down, but I think by that point we'd mostly just want to rewrite it, or use a different library anyway. At which point we wouldn't want to bring in the EPL baggage if we can have a BSD implementation.

So yea, there's some implementation in there, but its not easy to use or get to...

-- 
Shawn.
Previous: Rogan Dawes
Message 16 of 16 in “JGIT: discuss: diff/patch implementation”
  1. Francis GaliegueNov 10, 2008
  2. Robin RosenbergNov 10, 2008
  3. Francis GaliegueNov 10, 2008
  4. Robin RosenbergNov 10, 2008
  5. Francis GaliegueNov 10, 2008
  6. Johannes SchindelinNov 10, 2008
  7. Francis GaliegueNov 10, 2008
  8. Junio C HamanoNov 10, 2008
  9. Shawn O. PearceNov 10, 2008
  10. Francis GaliegueNov 10, 2008
  11. Johannes SchindelinNov 10, 2008
  12. Raimund BauerNov 11, 2008
  13. Shawn O. PearceNov 11, 2008
  14. Sverre RabbelierNov 11, 2008
  15. Rogan DawesNov 11, 2008
  16. Shawn O. PearceNov 11, 2008

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.