-
Notifications
You must be signed in to change notification settings - Fork 15
Local git repo design thoughts
Git repos still have some use for local-only credential storage, because you can re-save the same credentials with the same keys, but with different environment variables each time. You might also re-save with different subsequent versions of credulous as the on-disk format changes.
However, there are a lot of potential git options when configuring a repo, and we don't want Credulous to get into the business of being a generic git option/configuration manager.
We have to balance this with wanting Credulous to be the simplest, easiest tool for people to use for most cases, and wanting to support local and remote git repos; this suggests to me that we don't want users to have to learn git first, and we also don't want to get in the way of those who already know it well.
This is a discussion document, not a definitive statement of goals.
- if we create a new repo, and the user has never set up their most-basic git config options (email and fullname), do we want to prompt them?
We want to plan for the scenario where a user is setting up git for a remote repository, even if it's not implemented at first; perhaps a command like credulous add remote
, but how to specify which repository we're talking about? Maybe a -r
and --repository
argument.
At first, though, we should rely on people knowing enough about using git to be able to init the repository themselves, add remotes, etc.
- local-only repository (no remotes)
- presume pre-existing git repo
- save new creds
- git add
- git commit, with comment
- single-remote repositories, once local-only is done
- push, pull, merge conflict resolution
- pulls should always just overwrite conflicts with whatever's latest (local or remote)
- always pull before push
- when should we pull -- every time credentials are sourced, by default; able to suppress with a
--nopull
or-n
argument