Skip to content

cli: add a git config command #6616

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

Merged
merged 13 commits into from
Aug 14, 2023
Merged

cli: add a git config command #6616

merged 13 commits into from
Aug 14, 2023

Conversation

ethomson
Copy link
Member

@ethomson ethomson commented Aug 2, 2023

Builds on #6615

ethomson added 13 commits July 25, 2023 18:38
Don't set entry data when we "get" an entry from the collection, add the
data to the entry before it's put into the collection. This keeps the
entry creation logic in a single place.
The opaque `payload` on an entry is unnecessary and distracting; config
entries should follow the patterns of other objects and use space
elsewhere 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 on
disk). This is propagated through snapshots.
Provide two memory-backed configuration backends -- one that takes a
string in config file format `[section] key=value` and one that takes a
list of strings in `section.key=value` format.
Add a `config` command with `--list` and `--get`.
Introduce `cli_repository_open` which will reparse command-line options
looking for `-c` or `--config-env`. Add those values to an in-memory
configuration database and configure the opened repository with that.
Instead of special casing `--help`, reorder the arguments for
subcommands so that it can handle "global" arguments like `--help`,
`-c key=value`, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant