Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
index 5449cf15b3..c968ba37cf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
@@ -206,8 +206,13 @@ public class RemoteConfig implements Serializable {
}
receivepack = val;
- val = rc.getString(SECTION, name, KEY_TAGOPT);
- tagopt = TagOpt.fromOption(val);
+ try {
+ val = rc.getString(SECTION, name, KEY_TAGOPT);
+ tagopt = TagOpt.fromOption(val);
+ } catch (IllegalArgumentException e) {
+ // C git silently ignores invalid tagopt values.
+ tagopt = TagOpt.AUTO_FOLLOW;
+ }
mirror = rc.getBoolean(SECTION, name, KEY_MIRROR, DEFAULT_MIRROR);
timeout = rc.getInt(SECTION, name, KEY_TIMEOUT, 0);
}

Back to the top