monodevelop
monodevelop copied to clipboard
[Version Control] Avoid creating .git if it already exists
When creating a new project into a folder which already has already been setup as a git repo, avoid create the .git folder.
Fixes VSTS #660470
Matt, I liked your idea. Thanks guys for the feedback!. I have made changes to disable the Git option if a .git folder already exists (in the selected path). However, I have some doubts. Should we show a warning icon with a popup and information in this case? Thus, in case of doubt the user knows why it is disabled. Another one, should we check for a .gitignore file and if exists disable the option to create the gitignore file?
The behavior with .gitignore with this changes:
- .gitginore exists in project folder (not parent, given the selected target folder already exists) > disable and uncheck checkbox.
- .gitignore exists in a parent folder > enable and uncheck checkbox.
- .gitignore does not exist (neither target nor parent folder) > enable and check the checkbox.
I have reviewed the tests too:

Hey @mkrueger, thanks for the feedback but, what do you mean by the EventArgs?
@jsuarezruiz I think @mkrueger meant to use EventArgs.Empty instead of creating a new instance
Ah, ok!. Changed. Thanks guys.