Merge branch 'jn/branch-move-to-self'
authorJunio C Hamano <gitster@pobox.com>
Wed, 14 Dec 2011 06:53:08 +0000 (22:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Dec 2011 06:53:08 +0000 (22:53 -0800)
* jn/branch-move-to-self:
  Allow checkout -B <current-branch> to update the current branch
  branch: allow a no-op "branch -M <current-branch> HEAD"

1  2 
branch.c
branch.h
builtin/branch.c
builtin/checkout.c

diff --cc branch.c
Simple merge
diff --cc branch.h
Simple merge
index e1e486e4c51194e09df3779be254cb72855d1103,823789fc95f609ca5a763be545f3963c2fa5a1ec..465ff6a513f3e314d4a526b6f8ee9f7a7c7b43f4
@@@ -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."));
Simple merge