Merge branch 'jt/fast-export-copy-modify-fix'
[gitweb.git] / branch.c
index 703ded69ca2697f34bc1e225ccecebf33e5ad0b1..4377ce2fb17d7467ee92d4db02cb4859f6397505 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -191,9 +191,8 @@ int validate_new_branchname(const char *name, struct strbuf *ref,
 
        if (!attr_only) {
                const char *head;
-               struct object_id oid;
 
-               head = resolve_ref_unsafe("HEAD", 0, oid.hash, NULL);
+               head = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
                if (!is_bare_repository() && head && !strcmp(head, ref->buf))
                        die(_("Cannot force update the current branch."));
        }