Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
sha1_file.c: Avoid multiple calls to find_pack_entry().
[gitweb.git]
/
builtin-branch.c
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.");
}