From 66c9314d20a65aed6518fc00eb2662b698ffa61a Mon Sep 17 00:00:00 2001 From: Vasya Novikov Date: Sun, 15 Jun 2014 02:14:27 +0400 Subject: [PATCH 1/2] make it possible to reference a branch of a local git repository Reasoning on why this change is wanted can be found on the "sbt-dev" mailing list, topic "problem with referencing a local git repository" --- util/io/src/main/scala/sbt/IO.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/io/src/main/scala/sbt/IO.scala b/util/io/src/main/scala/sbt/IO.scala index 339b77bdd..0b269aa6a 100644 --- a/util/io/src/main/scala/sbt/IO.scala +++ b/util/io/src/main/scala/sbt/IO.scala @@ -832,7 +832,7 @@ object IO { { if (!uri.isAbsolute) return uri; //assertAbsolute(uri) val str = uri.toASCIIString - val dirStr = if (str.endsWith("/") || uri.getScheme != FileScheme) str else str + "/" + val dirStr = if (str.endsWith("/") || uri.getScheme != FileScheme || uri.getRawFragment != null) str else str + "/" (new URI(dirStr)).normalize } /** Converts the given File to a URI. If the File is relative, the URI is relative, unlike File.toURI*/ From 33ee4a30c856ddd8e474f9bb885a8033fdc21e00 Mon Sep 17 00:00:00 2001 From: Vasya Novikov Date: Tue, 24 Jun 2014 02:24:51 +0400 Subject: [PATCH 2/2] minor change: code style --- util/io/src/main/scala/sbt/IO.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/io/src/main/scala/sbt/IO.scala b/util/io/src/main/scala/sbt/IO.scala index 0b269aa6a..4a4ca998b 100644 --- a/util/io/src/main/scala/sbt/IO.scala +++ b/util/io/src/main/scala/sbt/IO.scala @@ -832,7 +832,7 @@ object IO { { if (!uri.isAbsolute) return uri; //assertAbsolute(uri) val str = uri.toASCIIString - val dirStr = if (str.endsWith("/") || uri.getScheme != FileScheme || uri.getRawFragment != null) str else str + "/" + val dirStr = if (str.endsWith("/") || uri.getScheme != FileScheme || Option(uri.getRawFragment).isDefined) str else str + "/" (new URI(dirStr)).normalize } /** Converts the given File to a URI. If the File is relative, the URI is relative, unlike File.toURI*/