/*
- * Copyright (C) 2008, 2013 Shawn O. Pearce <spearce@spearce.org> and others
+ * Copyright (C) 2008, 2022 Shawn O. Pearce <spearce@spearce.org> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
this.allowMismatchedWildcards = mode;
String s = spec;
- if (s.startsWith("^+") || s.startsWith("+^")) {
+ if (s.startsWith("^+") || s.startsWith("+^")) { //$NON-NLS-1$ //$NON-NLS-2$
throw new IllegalArgumentException(
JGitText.get().invalidNegativeAndForce);
}
s = s.substring(1);
}
- if(s.startsWith("^")) {
+ if (s.startsWith("^")) { //$NON-NLS-1$
negative = true;
s = s.substring(1);
}
* the specification is invalid.
*/
public RefSpec(String spec) {
- this(spec, spec.startsWith("^") ? WildcardMode.ALLOW_MISMATCH
+ this(spec, spec.startsWith("^") ? WildcardMode.ALLOW_MISMATCH //$NON-NLS-1$
: WildcardMode.REQUIRE_MATCH);
}