Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] API to get diff between Index and specific revision

On Wed, Feb 1, 2017 at 10:45 PM, Pascal Rapicault <pascal@xxxxxxxxxxxx> wrote:
Hi,

Is there a EGit or JGit API that given a file in Index and a commit id, can return the diff between the file contained in index and the file contained in the commit id?
At this point, I just need to know the added / removed / changed lines and their positions.

Thanks in advance for any insight,

have a look at DiffFormatter and DiffCommand in JGit, also see DiffFormatterTest, DiffCommandTest
and EGit's CreatePatchOperation

HTH
-Matthias

Back to the top