Bug 18086 - "NGit.Api.Errors.CannotDeleteCurrentBranchException" error is shown if user attempts to delete master branch from published project
Summary: "NGit.Api.Errors.CannotDeleteCurrentBranchException" error is shown if user a...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 4.2.x
Hardware: All All
: Normal normal
Target Milestone: master
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2014-02-28 08:28 UTC by Prashant manu
Modified: 2014-03-05 12:18 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Prashant manu 2014-02-28 08:28:14 UTC
Steps to reproduce:
1. Open XS
2. Open a new or existing solution.
3. Go to Version Control> Publish
4. Select Repository pop up opens.
5. Publish the project
6. Select published project or solution at solution sidebar.
7. Now open Version control menu and select option "manage branches and remotes"
8. At "Git repository configuration" window select master branch and click delete button.

Actual Result:
"NGit.Api.Errors.CannotDeleteCurrentBranchException" error is shown at Git Repository configuration window if user attempts to delete master branch  

Expected Result:
User should not be allowed to delete master branch and no exception should be shown.

Screencast for this:
Screencast: http://screencast.com/t/yrtQMklo

Supplement info: 
Exception Details: https://gist.github.com/saurabh360/42be50e7ee33c29348ce
IDE Logs:  https://gist.github.com/saurabh360/f56a459030b40a5a1316

Environment details:
All Mac and windows
XS 4.2.4(build 22)
Xam.Android 4.12.0-31
Xam.iOS 7.0.7-2

Regression Status: NOT A REGRESSION Same behavior happening with stable XS 4.2.2(build 2)
Comment 1 Marius Ungureanu 2014-03-04 23:12:12 UTC
Just a comment. It should not let you delete the branch you are currently on. Deleting master is perfectly valid.
Comment 2 Marius Ungureanu 2014-03-05 12:18:28 UTC
This is fixed in master.