From: Junio C Hamano Date: Wed, 14 Dec 2011 06:53:08 +0000 (-0800) Subject: Merge branch 'jn/branch-move-to-self' X-Git-Tag: v1.7.9-rc0~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b2dd02112052aff875e8dc7d12b9915c91feafe2;p=git.git Merge branch 'jn/branch-move-to-self' * jn/branch-move-to-self: Allow checkout -B to update the current branch branch: allow a no-op "branch -M HEAD" --- b2dd02112052aff875e8dc7d12b9915c91feafe2 diff --cc builtin/branch.c index e1e486e4c,823789fc9..465ff6a51 --- a/builtin/branch.c +++ b/builtin/branch.c @@@ -568,8 -565,10 +568,9 @@@ static int print_ref_list(int kinds, in static void rename_branch(const char *oldname, const char *newname, int force) { struct strbuf oldref = STRBUF_INIT, newref = STRBUF_INIT, logmsg = STRBUF_INIT; - unsigned char sha1[20]; struct strbuf oldsection = STRBUF_INIT, newsection = STRBUF_INIT; int recovery = 0; + int clobber_head_ok; if (!oldname) die(_("cannot rename the current branch while not on any."));