ShyykoSerhiy / git-autoconfig

Automatic git config user.email and user.name setting for vscode
https://marketplace.visualstudio.com/items?itemName=shyykoserhiy.git-autoconfig
MIT License
25 stars 11 forks source link

Add option to not auto add config #3

Open muuvmuuv opened 4 years ago

muuvmuuv commented 4 years ago

Because it is possible to set a global git user it is not needed to set this exact one manually. Adding a new option to disable auto add would be great. A VS Code command to change/add one would be needed then.

ShyykoSerhiy commented 4 years ago

Added for next release.

ShyykoSerhiy commented 4 years ago

Implemented in 0.0.2 (commit https://github.com/ShyykoSerhiy/git-autoconfig/commit/5cbc6ffb3172f7fe30753f1ecc55ea97957ac5a7). Try it out.

muuvmuuv commented 4 years ago

It is still asking. Did I get that correctly that I can just ignore a project? This would get a hell of a mess for test projects (I often do smth like npx create-next-app or ng new). Why not asking git for the current user config and if present do not ask to add one? Then a command can be used to easily add a different one.

ShyykoSerhiy commented 4 years ago

I would still need to store somewhere that you want to use global config instead of local one (per project). I can probably add a config param like "storeIgnorePerProject": boolean. If true then ignore list isn't stored globally, but instead for each ignored project "git-autoconfig.ignoreThisProject" property is set to true. If the folder with the project is removed, then "git-autoconfig.ignoreThisProject" is removed with the project too. This way temporary projects with the same folder path would work fine.

muuvmuuv commented 4 years ago

Why is any config needed for that? I don't get it. I think it would be enough to just have one of those options:

No idea if VS Code can run git commands but would make it less of a hastle.

Two commands to add the user config and one that removes it is just an addition that would make it ez if someone like me uses global config but has cloned a repo from a private GitLab for example.