From 8c0ce3abe86ca50ccf583ddfbbccb7e601128c44 Mon Sep 17 00:00:00 2001 From: William Petit Date: Tue, 7 Apr 2020 08:27:44 +0200 Subject: [PATCH] Git Fetcher: handle URL with '.git' suffix --- internal/project/git.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/project/git.go b/internal/project/git.go index 0242c94..4df2cb2 100644 --- a/internal/project/git.go +++ b/internal/project/git.go @@ -3,6 +3,8 @@ package project import ( "log" "net/url" + "os" + "strings" "github.com/pkg/errors" "gopkg.in/src-d/go-billy.v4" @@ -53,6 +55,7 @@ func (f *GitFetcher) Fetch(url *url.URL) (billy.Filesystem, error) { URL: url.String(), Auth: auth, ReferenceName: branchName, + Progress: os.Stdout, }) if err != nil { if err == transport.ErrRepositoryNotFound { @@ -85,6 +88,10 @@ func (f *GitFetcher) Match(url *url.URL) bool { return true } + if strings.HasSuffix(url.Path, ".git") { + return true + } + isFilesystemPath := isFilesystemPath(url.Path) if url.Scheme == "" && !isFilesystemPath { return true