]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-branch.c
Consolidate {receive,fetch}.unpackLimit
[thirdparty/git.git] / builtin-branch.c
index c760e188ea4169d878986ebd0d6c22702802aa59..25ffa5491c62ea047e5fad78e60b8fa7e4e6a2fe 100644 (file)
@@ -324,7 +324,7 @@ static void create_branch(const char *name, const char *start_name,
        if (resolve_ref(ref, sha1, 1, NULL)) {
                if (!force)
                        die("A branch named '%s' already exists.", name);
-               else if (!strcmp(head, name))
+               else if (!is_bare_repository() && !strcmp(head, name))
                        die("Cannot force update the current branch.");
        }