X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=branch.c;h=6a750574fd376e4d54e4ef2576674d42521f1529;hb=0fd9d7e66deb7071da2a568b96c94f94ee890908;hp=56e949232cac1fe9dbe23aa93b50fe2f7c55c07d;hpb=b71ce7f3f13ebd0e212bdda82b012ee36df4f63f;p=git.git diff --git a/branch.c b/branch.c index 56e949232..6a750574f 100644 --- a/branch.c +++ b/branch.c @@ -129,7 +129,9 @@ void create_branch(const char *head, die("Cannot setup tracking information; starting point is not a branch."); break; case 1: - /* Unique completion -- good */ + /* Unique completion -- good, only if it is a real ref */ + if (track == BRANCH_TRACK_EXPLICIT && !strcmp(real_ref, "HEAD")) + die("Cannot setup tracking information; starting point is not a branch."); break; default: die("Ambiguous object name: '%s'.", start_name); @@ -166,7 +168,7 @@ void create_branch(const char *head, void remove_branch_state(void) { unlink(git_path("MERGE_HEAD")); - unlink(git_path("rr-cache/MERGE_RR")); + unlink(git_path("MERGE_RR")); unlink(git_path("MERGE_MSG")); unlink(git_path("SQUASH_MSG")); }