Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Tyley2011-01-12 14:34:10 +0000
committerRoberto Tyley2011-01-12 14:34:10 +0000
commit944fcdae66bb4de712e2eadec73d8008d3a9bace (patch)
treeb92a65c2e7d53aa90e849bac0879374fd8f113dc /org.eclipse.jgit.test
parentbe38185a033021da707f934caf96b68070050bd5 (diff)
downloadjgit-944fcdae66bb4de712e2eadec73d8008d3a9bace.tar.gz
jgit-944fcdae66bb4de712e2eadec73d8008d3a9bace.tar.xz
jgit-944fcdae66bb4de712e2eadec73d8008d3a9bace.zip
Fix API ListBranchCommand for listmode 'all'
If remote branches are present they can not be added to the RefMap from the local branches - the two RefMaps have a different value of 'prefix' and consequently an IllegalArgumentException is thrown.
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java
index eb1b72ed9c..7464a5ea3b 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java
@@ -190,6 +190,12 @@ public class BranchCommandTest extends RepositoryTestCase {
}
@Test
+ public void testListAllBranchesShouldNotDie() throws Exception {
+ Git git = setUpRepoWithRemote();
+ git.branchList().setListMode(ListMode.ALL).call();
+ }
+
+ @Test
public void testCreateFromCommit() throws Exception {
Ref branch = git.branchCreate().setName("FromInitial").setStartPoint(
initialCommit).call();

Back to the top