Bug 11449 - Exception when trying to switch to a different GIT branch
Summary: Exception when trying to switch to a different GIT branch
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 4.0.2
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Marius Ungureanu
Depends on:
Reported: 2013-03-27 13:28 UTC by tharealjohn
Modified: 2013-07-11 06:19 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 tharealjohn 2013-03-27 13:28:07 UTC
I have created a new branch for my GIT controlled project using the Manage Branches menu under Version Control.

Now when I select the branch to change to it, i get the following exception from Xamarin Studio:

Branch switch failed. Value does not fall within the expected range.

NGit.Errors.RevisionSyntaxException: Value does not fall within the expected range.
  at NGit.Repository.Resolve (NGit.Revwalk.RevWalk rw, System.String revstr) [0x007f1] in /Users/builder/data/lanes/monodevelop-lion-bs1/2be11af9/source/monodevelop/main/external/ngit/NGit/NGit/Repository.cs:915 
  at NGit.Repository.Resolve (System.String revstr) [0x00007] in /Users/builder/data/lanes/monodevelop-lion-bs1/2be11af9/source/monodevelop/main/external/ngit/NGit/NGit/Repository.cs:403 
  at MonoDevelop.VersionControl.Git.GitUtil.GetChangedFiles (NGit.Repository repo, System.String refRev) [0x00007] in /Users/builder/data/lanes/monodevelop-lion-bs1/2be11af9/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitUtil.cs:212 
  at MonoDevelop.VersionControl.Git.GitRepository.SwitchToBranch (IProgressMonitor monitor, System.String branch) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-bs1/2be11af9/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs:1184 
  at MonoDevelop.VersionControl.Git.GitService+<SwitchToBranch>c__AnonStorey12.<>m__1E (System.Object ) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-bs1/2be11af9/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitService.cs:118 :Version 2.1
Any suggestions on how I can switch to my branch using the Xamarin Studio?

Note: I created a new branch, with it tracking the 'master' branch.

The branch name was Version 2.1 
I changed this name to v210 and the problem went away. I suspect it didnt like the space or '.' in the Version 2.1 text.
Comment 1 Marius Ungureanu 2013-07-11 05:42:12 UTC
It doesn't like either. I will make it unable to create branches through MD that contain special characters.

Comment 2 Marius Ungureanu 2013-07-11 06:19:27 UTC
Fixed in tip of master of MD.