OSDN Git Service

Fix issue 17 Switch should default branch to current branch
[tortoisegit/TortoiseGitJp.git] / src / Git / Git.cpp
index a308409..f000ef0 100644 (file)
@@ -552,12 +552,12 @@ int CGit::GetBranchList(STRING_VECTOR &list,int *current,BRANCH_TYPE type)
                CString one;\r
                while( pos>=0 )\r
                {\r
-                       i++;\r
                        one=output.Tokenize(_T("\n"),pos);\r
                        list.push_back(one.Right(one.GetLength()-2));\r
                        if(one[0] == _T('*'))\r
                                if(current)\r
                                        *current=i;\r
+                       i++;\r
                }\r
        }\r
        return ret;\r