Skip to content

add new action: init which combines --install and --store #50

@samirnoman

Description

@samirnoman

When adding git-store-meta for the first time to a git repo, we have to issue two seperate commands:

perl git-store-meta.pl --install # this isntalls the hooks but not .git_store_meta
perl git-store # this creates .git_store_meta

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:

  1. we can add a new option (such as '--create_store') which will work with --install action
  2. we can make creation of the .git_store_meta automatic with --install (if it does not exist of course) and add (--no-store) if we don't this to happen
  3. add a new action (--init) which will run --install and then --store actions together

I have made a PR (#46 ) 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions