Skip to content

Avoid modifying git hooks if created as sub directory in an existing git repo #2131

Closed
@bseib

Description

@bseib

Version

3.0.0-rc.9

Node and OS info

Node 8.11.3 / npm 6.3.0 / MacOS (and Win7)

Steps to reproduce

// cd into exiting git project
vue create foo
// choose "manually select features"
// deselect all features (actually it doesn't matter what you select)
image

When the dependencies are installed, Yorkie gets installed, and Git hooks are setup, whether I want them or not.

image

What is expected?

I don't expect my git hooks to be touched unless I require them and have been informed that they will be changed.

If users select a feature that requires git hooks, they should be told that the hooks will be installed (and perhaps how to uninstall them in the future -- maybe name the hooks more obviously). If the features they select do not require git hooks, then no hooks should be installed.

What is actually happening?

After running vue create foo, if you list the contents of .git/hooks, you will find the 19 new hooks have been installed by Yorkie.

When the foo directory is deleted, the hooks still expect foo directory to exist and give errors when git commands are used.


Here's a conversation on the forum on this topic: https://forum.vuejs.org/t/vue-cli-3-yorkie-and-git-stash/39828

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions