diff options
author | David Turner <dturner@twosigma.com> | 2017-06-21 15:23:03 -0400 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2017-06-23 00:10:20 +0200 |
commit | 695e38a83bafbc5477c326050e39b1b63ea0f5f0 (patch) | |
tree | 1e57300c2190d24b08ac9e1efebb3905042d79c8 /org.eclipse.jgit.test/tst/org/eclipse | |
parent | 43672700e747c3f95b64871b125129c152b9fa20 (diff) | |
download | jgit-695e38a83bafbc5477c326050e39b1b63ea0f5f0.tar.gz jgit-695e38a83bafbc5477c326050e39b1b63ea0f5f0.zip |
Add a test for parsing fsck config options and expose FsckMode enum
These config options allow overriding the message type (error, warn or
ignore) of a specific message ID such as missingEmail.
The supported fsck message IDs are defined in ObjectChecker.ErrorType.
Since TransferConfig.FsckMode wasn't public parsing fsck configuration
options like e.g. fsck.missingEmail=ignore failed with an
IllegalAccessException. Fix this by declaring this enum public.
Change-Id: I3f41ff7a76a846250a63ce92a9fd111eb347269f
Signed-off-by: David Turner <dturner@twosigma.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java index 8c613ec488..e0c1499030 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java @@ -83,6 +83,11 @@ public class PushCommandTest extends RepositoryTestCase { // create other repository Repository db2 = createWorkRepository(); + final StoredConfig config2 = db2.getConfig(); + + // this tests that this config can be parsed properly + config2.setString("fsck", "", "missingEmail", "ignore"); + config2.save(); // setup the first repository final StoredConfig config = db.getConfig(); |