aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2012-10-17 07:55:15 -0700
committerShawn O. Pearce <spearce@spearce.org>2012-10-17 18:04:25 -0700
commit99e9a3bdc610f91e7dd7a78af3c5c9ce8b01a7a7 (patch)
tree41efc4e36dfec0bca4f2fc8b9344b355d9a4b6d4 /org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
parent5fc7bd783be8513eea441bd14d573f69ba88f175 (diff)
downloadjgit-99e9a3bdc610f91e7dd7a78af3c5c9ce8b01a7a7.tar.gz
jgit-99e9a3bdc610f91e7dd7a78af3c5c9ce8b01a7a7.zip
Simplify push error message when ref already exists
If a client attempts to create a branch that already exists on the remote side, tell them "already exists" rather than repeat lots of information about the reference. Previously the error looked like: ! [remote rejected] tags/1.3.1 -> 1.3.1 (Ref Ref[refs/tags/1.3.1=e3857ee05...] already exists) Now it will simply say: ! [remote rejected] tags/1.3.1 -> 1.3.1 (already exists) Change-Id: I96fc67ca8b650052de6e662449a3c5bc8bbc010b
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
index 4fb3c174cd..0cd478cd54 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
@@ -131,7 +131,7 @@ public class CreateBranchCommand extends GitCommand<Ref> {
&& refToCheck.getName().startsWith(Constants.R_HEADS);
if (!force && exists)
throw new RefAlreadyExistsException(MessageFormat.format(
- JGitText.get().refAlreadyExists, name));
+ JGitText.get().refAlreadyExists1, name));
ObjectId startAt = getStartPoint();
String startPointFullName = null;