#392: Strange message "already on master" ----------------------------+----------------------------------------------- Reporter: eschnett | Owner: eric9 Type: defect | Status: review Priority: minor | Milestone: ET_2013_11 Component: GetComponents | Version: Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by barry.wardell):
0001 doesn't look like it does quite the right thing. It checks that the two hashes (current and branch) are the same and doesn't do the checkout if they are. This could be wrong in a couple of cases: if two branches point to the same commit, or if the repository is on a detached head which also happens to be pointed to by a branch.
I think the following (untested) patch might be a better approach.