|Re: JGit in-core Merging [message #816821 is a reply to message #815574]
||Fri, 09 March 2012 09:51
| Christian Halstrick
Registered: July 2009
1) It works reliable and is used by tools like gerrit|
2) Some explanation:
The API in org.eclipse.jgit.api should expose what people know from native gits porcelain API. The names of the commands, options and so on should be the same as in native git so that developers who how to do something on the command line find fast how they do it with JGit.
Since native git merge doesn't expose "in-core" it's not in the MergeCommand.
But: this package is also meant that developers find out how to do things with JGit and find code examples there. If options are not exposed or if the org.eclipse.jgit.api is not efficient enough for your use case you can use the more low level API's. Very often you can write much faster and less resource consuming code when you don't use org.eclipse.jgit.api.
If you look at MergeCommand.call() you see how we construct mergers. If in this call you add a second parameter true you'll get a incore merger. You have two chances. Copy the code to your app and create a incore merger as explained. Or propose a new option to the MergeCommand.
Powered by FUDForum
. Page generated in 0.01871 seconds