Skip to content

Commit

Permalink
Merge pull request #175 from raboof/allowOmittedGitPostfix
Browse files Browse the repository at this point in the history
Allow omitted '.git' postfix
  • Loading branch information
dwijnand authored Jul 7, 2020
2 parents 74e03af + ccc8a13 commit c97aca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/typesafe/sbt/SbtGit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit c97aca2

Please sign in to comment.