add new action: init which combines --install and --store #46
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.
when we add git-store-meta for the first time to a git repo, we have to issue two seperate commands:
If we only install the hooks, the .git_store_meta is not created automatically. Without the file .git_store_meta, the hooks will not do anything.
This might confuse new users, because they may assume that installing the hooks is enough.
There are a few solutions to this:
I have made a modification to implement the third alternative (add action --init) because I think it's meaning is more intuitive to git users.
TODO: I think it might be a good idea to check if .git_store_meta already exist before overwriting it with --init action; unless --force is in effect (or use another option for that)