Bug 16616 - git: can not switch to another branch
Summary: git: can not switch to another branch
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 4.2.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2013-12-05 08:28 UTC by Jens
Modified: 2015-08-20 03:23 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 NOT_ON_ROADMAP

Description Jens 2013-12-05 08:28:08 UTC
I can not switch to my "master" branch in git. 
it is no problem to switch to the master branch with other software like source tree. If I switch to master in SourceTree, Xamarin Studio stays at "develop"

If I tell the IDE to switch to another branch, I expect it to just do it instead of throwing an exception at me!

here is the exception:

An error has occurred
Branch switch failed. Unmerged path: LetMeTalk/LetMeTalk_Android/Sources/Screens/CategoryImageView/CategoryImageFragment.cs

NGit.Errors.UnmergedPathException: Unmerged path: LetMeTalk/LetMeTalk_Android/Sources/Screens/CategoryImageView/CategoryImageFragment.cs
  at NGit.Dircache.DirCacheTree.ComputeSize (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x000d0] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:432 
  at NGit.Dircache.DirCacheTree.WriteTree (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:371 
  at NGit.Dircache.DirCacheTree.ComputeSize (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x00079] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:421 
  at NGit.Dircache.DirCacheTree.WriteTree (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:371 
  at NGit.Dircache.DirCacheTree.ComputeSize (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x00079] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:421 
  at NGit.Dircache.DirCacheTree.WriteTree (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:371 
  at NGit.Dircache.DirCacheTree.ComputeSize (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x00079] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:421 
  at NGit.Dircache.DirCacheTree.WriteTree (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:371 
  at NGit.Dircache.DirCacheTree.ComputeSize (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x00079] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:421 
  at NGit.Dircache.DirCacheTree.WriteTree (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:371 
  at NGit.Dircache.DirCacheTree.ComputeSize (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x00079] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:421 
  at NGit.Dircache.DirCacheTree.WriteTree (NGit.Dircache.DirCacheEntry[] cache, Int32 cIdx, Int32 pathOffset, NGit.ObjectInserter ow) [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCacheTree.cs:371 
  at NGit.Dircache.DirCache.WriteTree (NGit.ObjectInserter ow) [0x00011] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/external/ngit/NGit/NGit.Dircache/DirCache.cs:1070 
  at MonoDevelop.VersionControl.Git.StashCollection.Create (NGit.ProgressMonitor monitor, System.String message) [0x00100] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/Stash.cs:210 
  at MonoDevelop.VersionControl.Git.GitRepository.SwitchToBranch (IProgressMonitor monitor, System.String branch) [0x00078] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs:1480 
  at MonoDevelop.VersionControl.Git.GitService+<SwitchToBranch>c__AnonStorey13.<>m__1B (System.Object ) [0x00014] in /Users/builder/data/lanes/monodevelop-lion-license-sync/c5f82958/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitService.cs:127 

---- cut ----

=== Xamarin Studio ===

Version 4.2.2 (build 2)
Installation UUID: ef46ec6d-cbfa-4264-bb42-00cdaa25736e
Runtime:
	Mono 3.2.5 ((no/964e8f0)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302050000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 7.0.4.209 (Business Edition)
Hash: 23a0827
Branch: 
Build date: 2013-11-11 16:04:00-0500

=== Xamarin.Android ===

Version: 4.10.1 (Business Edition)
Android SDK: /Users/jens-uwe/Downloads/Programme/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

=== Build Information ===

Release ID: 402020002
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Build date: 2013-11-19 15:35:40+0000
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80

=== Operating System ===

Mac OS X 10.9.0
Darwin localhost 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 1 Marius Ungureanu 2013-12-05 08:30:23 UTC
Time to understand what unmerged path means in NGit. Thanks for the report.
Comment 2 Jens 2013-12-05 08:52:10 UTC
some more informations:

I wanted "develop" to go back a few versions via "version control -> log -> revert to this revision" and stumbled bug 16305
So I did this revert with SourceTree and everything seemed fine to me.

Anyway, when going to master I got this error and suddenly the stuff I wanted to be ignored appeared again :(
Comment 3 Marius Ungureanu 2014-03-05 20:21:38 UTC
I'm unsure of how to reproduce this even still. Marking as NEEDINFO.

One thing that reached my mind is probably the filemode changed between master and develop. And that's not a stash-able operation.
Comment 4 Jens 2014-03-06 03:08:00 UTC
it seems that something was not cleaned up correctly and when I used Sourcetree for switching between branches it cleaned everything up and now it works

I think you can close this...
Comment 5 Marius Ungureanu 2014-07-01 10:31:02 UTC
As per Jens' comment, I'm closing this.