Merge branch 'sd/branch-copy'
[gitweb.git] / builtin / log.c
index f8cccbc96403a791ff9d4641bac1c30b621c0d5e..d81a09051ead0bb14161c25ef30bf8b0348b3198 100644 (file)
@@ -1660,10 +1660,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                        check_head = 1;
 
                if (check_head) {
-                       struct object_id oid;
                        const char *ref, *v;
                        ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
-                                                oid.hash, NULL);
+                                                NULL, NULL);
                        if (ref && skip_prefix(ref, "refs/heads/", &v))
                                branch_name = xstrdup(v);
                        else