Merge branch 'jk/misc-resolve-ref-unsafe-fixes'
[gitweb.git] / reflog-walk.c
index 74ebe5148f6623f0bffd612262519266a8ab2cc4..842b2f77dc3e40a2eb296bfade00d9d2104ff9e1 100644 (file)
@@ -61,11 +61,10 @@ static struct complete_reflogs *read_complete_reflog(const char *ref)
        reflogs->ref = xstrdup(ref);
        for_each_reflog_ent(ref, read_one_reflog, reflogs);
        if (reflogs->nr == 0) {
-               struct object_id oid;
                const char *name;
                void *name_to_free;
                name = name_to_free = resolve_refdup(ref, RESOLVE_REF_READING,
-                                                    oid.hash, NULL);
+                                                    NULL, NULL);
                if (name) {
                        for_each_reflog_ent(name, read_one_reflog, reflogs);
                        free(name_to_free);
@@ -151,9 +150,8 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
                reflogs = item->util;
        else {
                if (*branch == '\0') {
-                       struct object_id oid;
                        free(branch);
-                       branch = resolve_refdup("HEAD", 0, oid.hash, NULL);
+                       branch = resolve_refdup("HEAD", 0, NULL, NULL);
                        if (!branch)
                                die ("No current branch");