summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-07-29 18:31:39 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2012-07-29 18:31:39 -0400
commit0ec1db820d298a351c470b78b05a8968fd85b1e1 (patch)
treed2520db0f4d9a918441bd228b23af97a823fa0ef /org.eclipse.jgit
parent958a517c867364134f329c8ff7be4f6c949d5117 (diff)
parentbeee7b86afd5d4e1e9185c1f81640b83d74398f3 (diff)
downloadjgit-0ec1db820d298a351c470b78b05a8968fd85b1e1.tar.gz
jgit-0ec1db820d298a351c470b78b05a8968fd85b1e1.zip
Merge "Fix resolving of relative file URIs in TransportLocal"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
index 8be940d9d0..5a23ae18d8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
@@ -118,10 +118,10 @@ class TransportLocal extends Transport implements PackTransport {
@Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NoRemoteRepositoryException {
+ File localPath = local.isBare() ? local.getDirectory() : local.getWorkTree();
+ File path = local.getFS().resolve(localPath, uri.getPath());
// If the reference is to a local file, C Git behavior says
// assume this is a bundle, since repositories are directories.
- //
- File path = local.getFS().resolve(new File("."), uri.getPath());
if (path.isFile())
return new TransportBundleFile(local, uri, path);