From 11a6ddb2c8a81815ee9d5411638487ee99770a0b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 20 Jan 2007 10:51:37 -0800 Subject: branch -f: no reason to forbid updating the current branch in a bare repo. Signed-off-by: Junio C Hamano --- builtin-branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-branch.c b/builtin-branch.c index c760e188ea..25ffa5491c 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -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."); } -- cgit v1.2.3