From ccc8a134ff37c994096b6ebb53a6200120e5d550 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 28 Nov 2019 17:32:58 +0100 Subject: [PATCH] Allow omitted '.git' postfix Co-authored-by: Johannes Rudolph --- src/main/scala/com/typesafe/sbt/SbtGit.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/com/typesafe/sbt/SbtGit.scala b/src/main/scala/com/typesafe/sbt/SbtGit.scala index c607388..db1bae4 100644 --- a/src/main/scala/com/typesafe/sbt/SbtGit.scala +++ b/src/main/scala/com/typesafe/sbt/SbtGit.scala @@ -124,11 +124,11 @@ object SbtGit { scmInfo := { val user = """(?:[^@\/]+@)?""" val domain = """([^\/]+)""" - val gitPath = """(.*)\.git\/?""" + val gitPath = """(.*)(?:\.git)?\/?""" val unauthenticated = raw"""(?:git|https?|ftps?)\:\/\/$domain\/$gitPath""".r val ssh = raw"""ssh\:\/\/$user$domain\/$gitPath""".r val headlessSSH = raw"""$user$domain:$gitPath""".r - + def buildScmInfo(domain: String, repo: String) = Option( ScmInfo( url(s"https://$domain/$repo"),