Bug 30087 - Removing a file that is added using "Add existing folder" causes file deletion, not removal from git.
Summary: Removing a file that is added using "Add existing folder" causes file deletio...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: master
Assignee: Marius Ungureanu
Depends on:
Reported: 2015-05-14 13:38 UTC by Atsushi Eno
Modified: 2015-05-14 14:59 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Atsushi Eno 2015-05-14 13:38:40 UTC
This happens with roslyn branch after libgit2 merge.

- Create a new C# Console project, checking "Use git for version control."
- Open the containing folder.
- Outside XS:
  - Create a new folder "Test" next to the .csproj file.
  - Create a new source "Test.cs" in the Test folder.
- Go back to XS and select the project on the solution pad.
- Perform "Add" -> "Add existing folder" via the context menu.
- Select "Test" folder, and in the next dialog, select both the Test folder and Test.cs in it, and press OK.
- Make sure that the Test.cs is added to git.
- On the solution pad, select Test.cs in Test folder.
- Perform "Version Control" -> "Remove" via the context menu.
  - It will ask the confirmation [*1] so click "Remove".

Actual Results:

An error dialog is shown with message [*2].
And the file is *deleted*. (Remember the confirmation message [*1]? It says "The files will be kept on disk.")

Not sure if it happened before libgit2 merge.

Are you sure you want to remove the selected items from the version control system?

The files will be kept on disk."

Version control operation failed: 

Could not find a part of the path.
Comment 1 Marius Ungureanu 2015-05-14 14:24:41 UTC
That's NGit still. LibGit2 wasn't merged to roslyn.
Comment 2 Atsushi Eno 2015-05-14 14:59:00 UTC
K let's invalidate this and reopen only if it still reproduces with libgit2 (but according to your attempt it won't).