diff options
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java index 8b6b28d7c8..c5b2ef8e5b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java @@ -652,7 +652,10 @@ public abstract class Repository implements AutoCloseable { // detached name = Constants.HEAD; if (!Repository.isValidRefName("x/" + name)) //$NON-NLS-1$ - throw new RevisionSyntaxException(revstr); + throw new RevisionSyntaxException(MessageFormat + .format(JGitText.get().invalidRefName, + name), + revstr); Ref ref = getRef(name); name = null; if (ref == null) @@ -702,7 +705,10 @@ public abstract class Repository implements AutoCloseable { if (name.equals("")) //$NON-NLS-1$ name = Constants.HEAD; if (!Repository.isValidRefName("x/" + name)) //$NON-NLS-1$ - throw new RevisionSyntaxException(revstr); + throw new RevisionSyntaxException(MessageFormat + .format(JGitText.get().invalidRefName, + name), + revstr); Ref ref = getRef(name); name = null; if (ref == null) @@ -751,7 +757,9 @@ public abstract class Repository implements AutoCloseable { return null; name = revstr.substring(done); if (!Repository.isValidRefName("x/" + name)) //$NON-NLS-1$ - throw new RevisionSyntaxException(revstr); + throw new RevisionSyntaxException( + MessageFormat.format(JGitText.get().invalidRefName, name), + revstr); if (getRef(name) != null) return name; return resolveSimple(name); |