Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » JGit API: How to generate diff against remote branch(JGit API: How to generate diff against remote branch)
JGit API: How to generate diff against remote branch [message #659259] Fri, 11 March 2011 17:08 Go to next message
Keith Childs is currently offline Keith ChildsFriend
Messages: 1
Registered: March 2011
Junior Member
We're currently evaluating using JGit to create some build tools. I've been playing around with the API and have gotten some of the basic things to work.

One thing I can't figure out, is how to generate a diff? I see a number of algorithms and diff classes in the package, but it isn't clear how to use them, at least in the way I need.

I've got a collection of repositories, and I want to scan through the repos looking for any of them that have changes in their index. I then want to be able to take a remote change list ID, and calculate a diff of all the files in the index against that remote changelist ID.

All the diff objects seem to focus on diffing two known files. Does JGit even support diffing a repository tree against a remote changelist?

Anyone point me in the right direction? Otherwise, I'll just be spawning GIT processes and parsing command responses Smile

Re: JGit API: How to generate diff against remote branch [message #659642 is a reply to message #659259] Mon, 14 March 2011 22:07 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
We don't have a friendly API yet for Diff.

For now, I recommend you looking at how the CLI module handles things...

org.eclipse.jgit.pgm.Diff
Previous Topic:Where to clone repo?
Next Topic:wrong path to ssh private key
Goto Forum:
  


Current Time: Thu Apr 18 18:50:06 GMT 2024

Powered by FUDForum. Page generated in 0.02018 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top