summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2013-01-11 14:39:51 -0800
committerShawn Pearce <spearce@spearce.org>2013-01-11 14:39:51 -0800
commit50eab4aa48377d628b2715a520378adab32221e0 (patch)
tree2a3db9353a02f493feede782ae3fa8fa7382b27d /org.eclipse.jgit
parent5630686655f768a38d682df7a792d86873d7e00b (diff)
downloadjgit-50eab4aa48377d628b2715a520378adab32221e0.tar.gz
jgit-50eab4aa48377d628b2715a520378adab32221e0.zip
Revert "Add additional FastForwardMode enums for different config contexts"
This reverts commit c98abc9c0586c73ef7df4172644b7dd21c979e9d. Change-Id: I1d2a0de81eb17860ee36b6d3d3c00959b880fb85
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java116
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java3
3 files changed, 2 insertions, 121 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
index 118e378ce5..04d91af4b0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
@@ -121,122 +121,6 @@ public class MergeCommand extends GitCommand<MergeResult> {
* forward).
*/
FF_ONLY;
-
- /**
- * The modes available for fast forward merges corresponding to the
- * options under branch.<name>.branch config option.
- */
- public enum MergeOptions {
- /**
- * {@link FastForwardMode#FF}.
- */
- __FF,
- /**
- * {@link FastForwardMode#NO_FF}.
- */
- __NO_FF,
- /**
- * {@link FastForwardMode#FF_ONLY}.
- */
- __FF_ONLY;
-
- /**
- * Map from <code>FastForwardMode</code> to
- * <code>FastForwardMode.MergeOptions</code>.
- *
- * @param ffMode
- * the <code>FastForwardMode</code> value to be mapped
- * @return the mapped code>FastForwardMode.MergeOptions</code> value
- */
- public static MergeOptions valueOf(FastForwardMode ffMode) {
- switch (ffMode) {
- case NO_FF:
- return __NO_FF;
- case FF_ONLY:
- return __FF_ONLY;
- default:
- return __FF;
- }
- }
- }
-
- /**
- * The modes available for fast forward merges corresponding to the
- * options under merge.ff config option.
- */
- public enum Merge {
- /**
- * {@link FastForwardMode#FF}.
- */
- TRUE,
- /**
- * {@link FastForwardMode#NO_FF}.
- */
- FALSE,
- /**
- * {@link FastForwardMode#FF_ONLY}.
- */
- ONLY;
-
- /**
- * Map from <code>FastForwardMode</code> to
- * <code>FastForwardMode.Merge</code>.
- *
- * @param ffMode
- * the <code>FastForwardMode</code> value to be mapped
- * @return the mapped code>FastForwardMode.Merge</code> value
- */
- public static Merge valueOf(FastForwardMode ffMode) {
- switch (ffMode) {
- case NO_FF:
- return FALSE;
- case FF_ONLY:
- return ONLY;
- default:
- return TRUE;
- }
- }
- }
-
- /**
- * Map from <code>FastForwardMode.Merge</code> to
- * <code>FastForwardMode</code>.
- *
- * @param ffMode
- * the <code>FastForwardMode.Merge</code> value to be mapped
- * @return the mapped code>FastForwardMode</code> value
- */
- public static FastForwardMode valueOf(FastForwardMode.Merge ffMode) {
- switch (ffMode) {
- case FALSE:
- return NO_FF;
- case ONLY:
- return FF_ONLY;
- default:
- return FF;
- }
- }
-
- /**
- * Map from <code>FastForwardMode.MergeOptions</code> to
- * <code>FastForwardMode</code>.
- *
- * @param ffMode
- * the <code>FastForwardMode.MergeOptions</code> value to be
- * mapped
- * @return the mapped code>FastForwardMode</code> value
- */
- public static FastForwardMode valueOf(
- FastForwardMode.MergeOptions ffMode) {
- switch (ffMode) {
- case __NO_FF:
- return NO_FF;
- case __FF_ONLY:
- return FF_ONLY;
- default:
- return FF;
- }
- }
}
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index 62cfedde66..5f58ece185 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -387,7 +387,7 @@ public class Config {
if (value == null)
return defaultValue;
- String n = value.replace('-', '_').replace(' ', '_');
+ String n = value.replace(' ', '_');
T trueState = null;
T falseState = null;
for (T e : all) {
@@ -722,7 +722,7 @@ public class Config {
*/
public <T extends Enum<?>> void setEnum(final String section,
final String subsection, final String name, final T value) {
- String n = value.name().toLowerCase().replace('_', '-');
+ String n = value.name().toLowerCase().replace('_', ' ');
setString(section, subsection, name, n);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
index 8fd84c8938..dbaa043e21 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
@@ -191,7 +191,4 @@ public class ConfigConstants {
/** The "mergeoptions" key */
public static final String CONFIG_KEY_MERGEOPTIONS = "mergeoptions";
-
- /** The "ff" key */
- public static final String CONFIG_KEY_FF = "ff";
}