-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Run git config
instead of reading config
file manually
#639
Run git config
instead of reading config
file manually
#639
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my, why did I choose to read the config file 😱
return true if line =~ /mirror\s*=\s*true/ | ||
end | ||
false | ||
capture("git config --get-regexp 'remote\\..+\\.mirror'").each_line.any?(&.==("true")) | ||
end | ||
|
||
private def origin_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can do something similar to origin_url
then to fix the problem related to #628?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this should work similarly.
The CI failure due to #640 masked another failure. This patch seems to be broken on Windows.
The reason is that the exit code of |
)" This reverts commit e8fe2bd.
I don't think there's a good reason to read the config file directly. Going through the CLI is easier and safer.
ref: #638 (comment)