projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
453c1e8
)
branch -f: no reason to forbid updating the current branch in a bare repo.
author
Junio C Hamano
<junkio@cox.net>
Sat, 20 Jan 2007 18:51:37 +0000
(10:51 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 21 Jan 2007 03:19:12 +0000
(19:19 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-branch.c
patch
|
blob
|
history
diff --git
a/builtin-branch.c
b/builtin-branch.c
index c760e188ea4169d878986ebd0d6c22702802aa59..25ffa5491c62ea047e5fad78e60b8fa7e4e6a2fe 100644
(file)
--- 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.");
}