summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-01-20 10:51:37 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2007-01-20 19:19:12 -0800
commit11a6ddb2c8a81815ee9d5411638487ee99770a0b (patch)
tree811512677982d7db5f59e7b0abeea187ae439058
parentgit-tag -d: allow deleting multiple tags at once. (diff)
downloadtgif-11a6ddb2c8a81815ee9d5411638487ee99770a0b.tar.xz
branch -f: no reason to forbid updating the current branch in a bare repo.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--builtin-branch.c2
1 files changed, 1 insertions, 1 deletions
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.");
}