monodevelop icon indicating copy to clipboard operation
monodevelop copied to clipboard

[Version Control] Avoid creating .git if it already exists

Open jsuarezruiz opened this issue 6 years ago • 5 comments

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

jsuarezruiz avatar Mar 19 '19 16:03 jsuarezruiz

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?

jsuarezruiz avatar Mar 25 '19 15:03 jsuarezruiz

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: Screenshot 2019-06-10 at 12 42 57

jsuarezruiz avatar Jun 10 '19 10:06 jsuarezruiz

Hey @mkrueger, thanks for the feedback but, what do you mean by the EventArgs?

jsuarezruiz avatar Jun 18 '19 09:06 jsuarezruiz

@jsuarezruiz I think @mkrueger meant to use EventArgs.Empty instead of creating a new instance

sevoku avatar Jul 02 '19 07:07 sevoku

Ah, ok!. Changed. Thanks guys.

jsuarezruiz avatar Jul 02 '19 09:07 jsuarezruiz