aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/lib
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-03-24 10:26:44 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2017-06-11 12:24:12 +0200
commitb6f954ad426f91561b4aa09d7ba23652516e7b0a (patch)
tree2e17a47047fc0ef2b48aea04b6b1bbbeaa404569 /org.eclipse.jgit/src/org/eclipse/jgit/lib
parent325b51dbd4ada37ab8890f38f2bbc046ee9bb92e (diff)
downloadjgit-b6f954ad426f91561b4aa09d7ba23652516e7b0a.tar.gz
jgit-b6f954ad426f91561b4aa09d7ba23652516e7b0a.zip
Fetch: Add --recurse-submodules and --no-recurse-submodules options
Add options to control recursion into submodules on fetch. Add a callback interface on FetchCommand, to allow Fetch to display an update "Fetching submodule XYZ" for each submodule. Change-Id: Id805044b57289ee0f384b434aba1dbd2fd317e5b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/SubmoduleConfig.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SubmoduleConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SubmoduleConfig.java
index 3126160c33..12f7b82343 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SubmoduleConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SubmoduleConfig.java
@@ -43,6 +43,10 @@
package org.eclipse.jgit.lib;
+import java.util.Locale;
+
+import org.eclipse.jgit.util.StringUtils;
+
/**
* Submodule section of a Git configuration file.
*
@@ -75,12 +79,17 @@ public class SubmoduleConfig {
@Override
public String toConfigValue() {
- return configValue;
+ return name().toLowerCase(Locale.ROOT).replace('_', '-');
}
@Override
public boolean matchConfigValue(String s) {
- return configValue.equals(s);
+ if (StringUtils.isEmptyOrNull(s)) {
+ return false;
+ }
+ s = s.replace('-', '_');
+ return name().equalsIgnoreCase(s)
+ || configValue.equalsIgnoreCase(s);
}
}
}