#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 rhaas):
I agree. The original solution would have failed in the situations that Barry outlined. git symbolic-ref seems to do the trick, with the exception that it prepends "refs/heads/" to the branch name. The attached patch adjusts the regex patterns for this.
Please note that none of our regex patterns are anchored (to the beginning or end) so that "master" and "master-untested" will both match. This is a bug.