Skip to content

Conversation

@barrettj12
Copy link
Owner

Config will be stored at the following levels:

  • global config - stored in $HOME/.jit/config.yaml
  • repo-specific config - stored in <repo-root>/.jit/config.yaml
  • (branch specific config?)

Config values are decided in the following precedence order:

  • command flags/args
  • environment variables
  • (branch specific config?)
  • repo-specific config
  • global config
  • hardcoded defaults

Config is stored as plain string maps in a yaml file. Given a config file like

sec:
  map:
    key: value

the full key for value is sec.map.key.

A jit config command will be added to set and get config values. Get a config value with

jit config key

Set repo-specific config with

jit config key=value

Set global config with

jit config --global key=value

@barrettj12
Copy link
Owner Author

Might be over-designing it a bit. We can just make everything a top-level key for now and see how it evolves.

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.

2 participants