Skip to main content



      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 12:08 Go to next message
Eclipse UserFriend
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 18:07 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 13:04:55 EDT 2025

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

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

Back to the top