|
|
|
@ -58,6 +58,7 @@ import java.util.List;
|
|
|
|
|
import org.eclipse.jgit.lib.Config; |
|
|
|
|
import org.eclipse.jgit.lib.ObjectId; |
|
|
|
|
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase; |
|
|
|
|
import org.eclipse.jgit.storage.file.FileRepository; |
|
|
|
|
import org.junit.After; |
|
|
|
|
import org.junit.Before; |
|
|
|
|
import org.junit.Test; |
|
|
|
@ -213,6 +214,18 @@ public class TransportTest extends SampleDataRepositoryTestCase {
|
|
|
|
|
assertEquals(ObjectId.zeroId(), tru.getOldObjectId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testLocalTransportWithRelativePath() throws Exception { |
|
|
|
|
FileRepository other = createWorkRepository(); |
|
|
|
|
String otherDir = other.getWorkTree().getName(); |
|
|
|
|
|
|
|
|
|
RemoteConfig config = new RemoteConfig(db.getConfig(), "other"); |
|
|
|
|
config.addURI(new URIish("../" + otherDir)); |
|
|
|
|
|
|
|
|
|
// Should not throw NoRemoteRepositoryException
|
|
|
|
|
transport = Transport.open(db, config); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testSpi() { |
|
|
|
|
List<TransportProtocol> protocols = Transport.getTransportProtocols(); |
|
|
|
|