Skip to content

Conversation

@mcepl
Copy link
Contributor

@mcepl mcepl commented May 19, 2025

Other way is to have explicit REMOTE argument.

Copy link
Contributor

@sudoforge sudoforge left a 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.

@sudoforge sudoforge changed the title pull, push: try reading git-bug.remote config value before default feat(config): add git-bug.remote for defining the default remote May 19, 2025
@sudoforge sudoforge changed the base branch from master to trunk June 7, 2025 17:22
@mcepl mcepl force-pushed the non-default-remote branch from 961f239 to 6421053 Compare July 30, 2025 14:32
@mcepl mcepl requested a review from sudoforge July 30, 2025 14:33
@mcepl mcepl force-pushed the non-default-remote branch from 6421053 to b586ce8 Compare November 20, 2025 17:37
@mcepl mcepl force-pushed the non-default-remote branch 2 times, most recently from 6f325ff to 9973497 Compare December 15, 2025 22:29
@mcepl
Copy link
Contributor Author

mcepl commented Dec 17, 2025

@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>
@mcepl mcepl force-pushed the non-default-remote branch from 9973497 to 2a63464 Compare January 19, 2026 22:11
Copy link
Contributor

@sudoforge sudoforge left a 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>
@mcepl mcepl force-pushed the non-default-remote branch from 2a63464 to 257a492 Compare January 27, 2026 15:11
@sudoforge sudoforge added this pull request to the merge queue Jan 27, 2026
Merged via the queue into git-bug:trunk with commit 5920f3e Jan 27, 2026
8 checks passed
@mcepl mcepl deleted the non-default-remote branch January 28, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants