Skip to content

Commit

Permalink
Add user-readable suffix to the git clone dirs, besides the sha
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Cunei committed Nov 16, 2015
1 parent 8c71655 commit 2b0834e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class GitProjectResolver extends ProjectResolver {

val uri = new _root_.java.net.URI(config.uri)
val uriString = UriUtil.dropFragment(uri).toASCIIString
val cloneDir = com.typesafe.dbuild.repo.core.GlobalDirs.clonesDir / (hashing sha1 uriString)
val baseName = ({s:String => if (s.endsWith(".git")) s.dropRight(4) else s})(uri.getRawPath().split("/").last)
val cloneDir = com.typesafe.dbuild.repo.core.GlobalDirs.clonesDir / ((hashing sha1 uriString) + "-" + baseName)
val ref = Option(uri.getFragment()) getOrElse "master"

// We cache a single git clone for this repository URI (sans fragment),
Expand Down

0 comments on commit 2b0834e

Please sign in to comment.