Skip to content

Commit

Permalink
try git first when detecting VCS
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Jun 11, 2016
1 parent c087d82 commit 67159d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions remote_repository.go
Expand Up @@ -168,10 +168,10 @@ func (repo *OtherRepository) VCS() *VCSBackend {
}

// Detect VCS backend automatically
if utils.RunSilently("hg", "identify", repo.url.String()) == nil {
return MercurialBackend
} else if utils.RunSilently("git", "ls-remote", repo.url.String()) == nil {
if utils.RunSilently("git", "ls-remote", repo.url.String()) == nil {
return GitBackend
} else if utils.RunSilently("hg", "identify", repo.url.String()) == nil {
return MercurialBackend
} else if utils.RunSilently("svn", "info", repo.url.String()) == nil {
return SubversionBackend
} else {
Expand Down

0 comments on commit 67159d3

Please sign in to comment.