]> source.dussan.org Git - jgit.git/commit
Add option to allow empty commits to CommitCommand 65/58165/4
authorChristian Halstrick <christian.halstrick@sap.com>
Wed, 14 Oct 2015 14:25:45 +0000 (16:25 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 20 Jan 2016 10:14:19 +0000 (11:14 +0100)
commitda43d8d79890e561a993a4d90e6a2724a04cd60f
treea48b07e93a6f17e0bc4c8f843d504517c29ed132
parenta01d6c1e55093529aaddc54bb6082a818f0956c6
Add option to allow empty commits to CommitCommand

CommitCommand should allow to specify whether empty commits (commits
having the same tree as the sole predecessor commit) are allowed or not.
Similar to native git's "--allow-empty" flag.

The defaults differ between JGit and native git even after this change.
When not specifying paths then by default JGit allows to create empty
commits while native git does not. It would be API breaking to change
this now.

Bug: 460301
Change-Id: I88feb0c3ffb2c686b1d0594e669729b065cda4cb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmtpyCommitException.java [new file with mode: 0644]