Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2011-03-22 18:39:39 +0000
committerRobin Stocker2011-03-22 18:46:18 +0000
commit770c733687d9f2f71f30822f9691427bf83b7577 (patch)
treeb0f390fe4e5e68efa2eecc7f47a5091334e34057 /org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
parentdcf7bd9a8f7acafbd1461dc0414aded2db030983 (diff)
downloadjgit-770c733687d9f2f71f30822f9691427bf83b7577.tar.gz
jgit-770c733687d9f2f71f30822f9691427bf83b7577.tar.xz
jgit-770c733687d9f2f71f30822f9691427bf83b7577.zip
PullCommand: Use short ref name in merge message
Add a test case for PullCommand for the successful merge case and test that the short ref name is used. Change-Id: I16cbbc88595f73e5512f984e67f93f87ee0fe242 Signed-off-by: Robin Stocker <robin@nibor.org>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
index 1c86bd6638..8eae4027a1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
@@ -277,9 +277,10 @@ public class PullCommand extends GitCommand<PullResult> {
}
} else {
MergeCommand merge = new MergeCommand(repo);
- merge.include(
- "branch \'" + remoteBranchName + "\' of " + remoteUri,
- commitToMerge);
+ String name = "branch \'"
+ + Repository.shortenRefName(remoteBranchName) + "\' of "
+ + remoteUri;
+ merge.include(name, commitToMerge);
MergeResult mergeRes;
try {
mergeRes = merge.call();

Back to the top