Git Fetcher: handle URL with '.git' suffix
This commit is contained in:
parent
d9e446553c
commit
8c0ce3abe8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue