Skip to content

Commit

Permalink
Merge pull request #118 from k0kubun/disable-user-completion
Browse files Browse the repository at this point in the history
Add ghq.completeUser config to disable user completion of `ghq get`
  • Loading branch information
Songmu authored Apr 26, 2019
2 parents 8bceed0 + e3ef713 commit d0b6286
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions url.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ func ConvertGitURLHTTPToSSH(url *url.URL) (*url.URL, error) {
}

func fillUsernameToPath(path string) (string, error) {
completeUser, err := GitConfigSingle("ghq.completeUser")
if err != nil {
return path, err
}
if completeUser == "false" {
return path + "/" + path, nil
}

user, err := GitConfigSingle("ghq.user")
if err != nil {
return path, err
Expand Down

0 comments on commit d0b6286

Please sign in to comment.