-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ghq get
does not clone to the primary root set in gitconfig
#239
Comments
Thank you for detailed report. Certainly, this is an unintended incompatible change. However, this may be more natural for gitconfig, so I'm not sure should I restore the behavior. |
thanks. I think so too. It is more natural to see the last root as primary from the point of view of gitconfig operation. If so, why not change the behavior of |
If this incompatible behavior to be true, ghq root must be changed. This is just my omission. |
The behavior has been adjusted in v0.17.3. Now, the last ghq.root setting is the primary directory to clone a repository. Sorry to trouble you to rewrite the settings. |
I think this is a great decision. thank you. |
Thanks to your polite report, this problem was solved quickly. Thank you very much. |
environment
my gitconfig
ghq root
returns~/.ghq
correctly, but whenghq get <repo>
, it is cloned to~/go/src
I think...
Until v0.16.0, the first path was extracted after getting all with
gitconfig.PathAll("ghq.root")
.https://github.com/motemen/ghq/blob/aeacda0267/local_repository.go#L99
https://github.com/motemen/ghq/blob/aeacda0267/local_repository.go#L343-L349
https://github.com/motemen/ghq/blob/aeacda026785e37a6f076fdc2f71b5d8153f49fa/local_repository.go#L310
But, since v0.17.0, that has been replaced by
gitconfig.Do("--path", "--get-urlmatch", "ghq.root", remoteURL.String())
.https://github.com/motemen/ghq/blob/bb059e45e7/local_repository.go#L99
https://github.com/motemen/ghq/blob/bb059e45e72c30b28e38fbadbda29dca71f8d04a/local_repository.go#L114
As a result of attaching the debugger,
gitconfig.Do(...)
returned the second root.Is this a bug?
The text was updated successfully, but these errors were encountered: