mirror of
https://github.com/x-motemen/ghq.git
synced 2026-09-10 07:26:27 -04:00
adjustment
This commit is contained in:
parent
671b1d2b23
commit
015f3d64f2
|
|
@ -60,7 +60,7 @@ func (g *getter) get(argURL string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if remote.IsValid() == false {
|
||||
if !remote.IsValid() {
|
||||
return fmt.Errorf("Not a valid repository: %s", u)
|
||||
}
|
||||
|
||||
|
|
|
|||
2
list.go
2
list.go
|
|
@ -81,7 +81,7 @@ func doList(c *cli.Context) error {
|
|||
}
|
||||
|
||||
for _, repo := range repos {
|
||||
if reposCount[repo.RelPath] > 1 && repo.IsUnderPrimaryRoot() == false {
|
||||
if reposCount[repo.RelPath] > 1 && !repo.IsUnderPrimaryRoot() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,13 +32,8 @@ func (repo *GitHubRepository) IsValid() bool {
|
|||
if strings.HasPrefix(repo.url.Path, "/blog/") {
|
||||
return false
|
||||
}
|
||||
|
||||
pathComponents := strings.Split(strings.Trim(repo.url.Path, "/"), "/")
|
||||
if len(pathComponents) < 2 {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return len(pathComponents) >= 2
|
||||
}
|
||||
|
||||
func (repo *GitHubRepository) VCS() (*VCSBackend, *url.URL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue