diff options
author | Robin Stocker | 2011-03-22 18:39:39 +0000 |
---|---|---|
committer | Robin Stocker | 2011-03-22 18:46:18 +0000 |
commit | 770c733687d9f2f71f30822f9691427bf83b7577 (patch) | |
tree | b0f390fe4e5e68efa2eecc7f47a5091334e34057 /org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java | |
parent | dcf7bd9a8f7acafbd1461dc0414aded2db030983 (diff) | |
download | jgit-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.java | 7 |
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(); |