-
-
Notifications
You must be signed in to change notification settings - Fork 293
feat(config): add git-bug.remote for defining the default remote #1460
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
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.
thanks for submitting @wahern's contribution!
as a general rule, for changes like this, we'd like to see unit tests added in concert. there's an existing test for this interface in //repository:config_test.go; that file would be a great place to implement tests for the new GetDefaultString().
you can also update your commit message to add a Closes: #11 trailer -- i think this effectively implements that.
961f239 to
6421053
Compare
6421053 to
b586ce8
Compare
6f325ff to
9973497
Compare
|
@sudoforge I have added some tests. What’s remaining here? The patch works pretty well for me. |
Other way is to have explicit REMOTE argument. Fixes: git-bug#11 Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
9973497 to
2a63464
Compare
sudoforge
left a comment
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.
overall, this looks good - there's just one minor issue with the schema file that i imagine crept in during some rebasing. thanks for the contribution!
Adds a new test function, `TestGetDefaultString`, to verify the logic for reading string configuration values with a default fallback. This test covers multiple scenarios: - A missing key correctly returns the default value. - An existing key returns its stored value. - A key with an empty string value returns the empty string, not the default. The test also explicitly validates the behavior for the `git-bug.remote` configuration to ensure the new remote-setting feature is correctly handled by the underlying config reader. Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
2a63464 to
257a492
Compare
Other way is to have explicit REMOTE argument.