Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2017-08-19 17:45:00 -0400
committerMatthias Sohn2017-08-19 17:45:00 -0400
commitf5264cfabfb2f921304536f4471bff469d9ba546 (patch)
tree63f73573db71627f3607dd766ddc8fdb6c2fe18c /org.eclipse.egit.core.test/src
parentd306c4a3c5a31cc80caca99c1d37cebdb44c8d24 (diff)
downloadegit-f5264cfabfb2f921304536f4471bff469d9ba546.tar.gz
egit-f5264cfabfb2f921304536f4471bff469d9ba546.tar.xz
egit-f5264cfabfb2f921304536f4471bff469d9ba546.zip
Remove repository from ListRemoteOperation
LsRemoteCommand can run ls-remote without a repository hence remove the unnecessary repository from ListRemoteOperation. SourceBranchPage created an unnecessary temporary repository in /tmp in order to run ls-remote before cloning a repository. This may fail if the user does not have write permissions in this folder. Bug: 521033 Change-Id: Id39107266551a3b7a9251cf9d26233f9bbfdc516 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.core.test/src')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java
index ad3d5721e..58a538dcc 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/ListRemoteOperationTest.java
@@ -103,15 +103,14 @@ public class ListRemoteOperationTest extends DualRepositoryTestCase {
URIish uri = new URIish("file:///"
+ repository2.getRepository().getDirectory().getPath());
- ListRemoteOperation lrop = new ListRemoteOperation(repository1
- .getRepository(), uri, 0);
+ ListRemoteOperation lrop = new ListRemoteOperation(uri, 0);
lrop.run(null);
assertEquals(4, lrop.getRemoteRefs().size());
assertNotNull(lrop.getRemoteRef("refs/heads/test"));
uri = new URIish("file:///"
+ repository1.getRepository().getDirectory().getPath());
- lrop = new ListRemoteOperation(repository2.getRepository(), uri, 0);
+ lrop = new ListRemoteOperation(uri, 0);
lrop.run(new NullProgressMonitor());
assertEquals(2, lrop.getRemoteRefs().size());
assertNotNull(lrop.getRemoteRef("refs/heads/master"));
@@ -127,8 +126,7 @@ public class ListRemoteOperationTest extends DualRepositoryTestCase {
URIish uri = new URIish("file:///"
+ repository2.getRepository().getDirectory().getPath());
- ListRemoteOperation lrop = new ListRemoteOperation(repository1
- .getRepository(), uri, 0);
+ ListRemoteOperation lrop = new ListRemoteOperation(uri, 0);
try {
lrop.getRemoteRefs();
fail("Expected Exception not thrown");
@@ -146,8 +144,7 @@ public class ListRemoteOperationTest extends DualRepositoryTestCase {
public void testIllegalURI() throws Exception {
URIish uri = new URIish("file:///" + "no/path");
- ListRemoteOperation lrop = new ListRemoteOperation(repository1
- .getRepository(), uri, 0);
+ ListRemoteOperation lrop = new ListRemoteOperation(uri, 0);
try {
lrop.run(new NullProgressMonitor());
fail("Expected Exception not thrown");

Back to the top