- Notifications
You must be signed in to change notification settings - Fork2.5k
config: provide an "origin" for config entries#6615
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Don't set entry data when we "get" an entry from the collection, add thedata to the entry before it's put into the collection. This keeps theentry creation logic in a single place.
The opaque `payload` on an entry is unnecessary and distracting; configentries should follow the patterns of other objects and use spaceelsewhere in the structure with a "base" config entry struct embedded.
A git_config_entry now knows the type of the origin for the entry("file", "memory", etc) and the path details (for files, the path ondisk). This is propagated through snapshots.
Provide two memory-backed configuration backends -- one that takes astring in config file format `[section] key=value` and one that takes alist of strings in `section.key=value` format.
vincenzopalazzo approved these changesAug 7, 2023
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.
LGMT
From the CI looks like that there is a failure, but I guess this is just an unlucky run
6: Test command: D:\a\libgit2\libgit2\build\Debug\libgit2_tests.exe "-v" "-sonline::clone::namespace"6: Working Directory: D:/a/libgit2/libgit2/build/tests/libgit26: Test timeout computed to be: 10000000[2116] unable to set SO_KEEPALIVE on socket: Input/output error6: Loaded 380 suites: 6: Started (test status codes: OK='.' FAILURE='F' SKIPPED='S')6: [3328] unable to set SO_KEEPALIVE on socket: Input/output error6: online::cloneF.6: 6: 1) Failure:6: online::clone::namespace_bare [D:\a\libgit2\libgit2\source\tests\libgit2\online\clone.c:1274]6: Function call failed: (git_clone(&g_repo, _remote_url, "./namespaced.git", &options))6: error -1 - error receiving data from socket: An existing connection was forcibly closed by the remote host.6: 6: 6: written summary file to D:/a/libgit2/libgit2/build/results_gitdaemon_namespace.xml6: Detected memory leaks!6: Dumping objects ->6: {2011} normal block at 0x0000022358A04410, 110 bytes long.6: Data: <error -1 - error> 65 72 72 6F 72 20 2D 31 20 2D 20 65 72 72 6F 72 6: {2010} normal block at 0x000002235BF223F0, 48 bytes long.6: Data: <` E > 60 10 DF 80 F6 7F 00 00 C8 45 DF 80 F6 7F 00 00 6: Object dump complete.1/1 Test #6: gitdaemon_namespace ..............***Failed 0.59 sec0% tests passed, 1 tests failed out of 1Total Test time (real) = 0.60 secThe following tests FAILED: 6 - gitdaemon_namespace (Failed)Errors while running CTestOutput from these tests are in: D:/a/libgit2/libgit2/build/Testing/Temporary/LastTest.logUse "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.Test exited with code: 8
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Callers may want to identifywhere a configuration entry came from (akin to
git config --list --show-origin
). Provide this information.