Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] New to JGit - some questions

Hello list,

I'm new to JGit and I'm trying to dive into it at the moment. I would like to implement squashed merges in future. But here are my questions:

1. Squashing needs to write a file called SQUASH_MSG to $GIT_DIR which is very similar to the output of the command "log". But log creates the output using org.eclipse.jgit.pgm.Log.show(RevCommit). For squashing I need the message formatter in the org.eclipse.jgit project. Any ideas where to put such common message formatting facilities?

2. I did some work on org.eclipse.jgit.api.MergeCommand.call() for prepare squashing. But I'm not sure how to find out the list of revisions the merger merged into the current workdir. I had a look on org.eclipse.jgit.api.MergeResult which has a constructor argument "mergedCommits" and Javadoc tells me "mergedCommits all the commits which have been merged together". But in each case MergeResult is created with only headCommit and srcCommit and not with all merged commits. Help is geatly appreciated.

Best regards

Jan Roehrich

Back to the top