tree.c: update read_tree_recursive callback to pass strbuf as base
[gitweb.git] / builtin / log.c
index 68d5d30035442a1d12cf0fbf8a10dca0df2711be..f2a9f0156d8a8b15c7c879355b137b669dea8cf2 100644 (file)
@@ -489,7 +489,7 @@ static int show_tag_object(const unsigned char *sha1, struct rev_info *rev)
 }
 
 static int show_tree_object(const unsigned char *sha1,
-               const char *base, int baselen,
+               struct strbuf *base,
                const char *pathname, unsigned mode, int stage, void *context)
 {
        printf("%s%s\n", pathname, S_ISDIR(mode) ? "/" : "");
@@ -1400,7 +1400,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                if (check_head) {
                        unsigned char sha1[20];
                        const char *ref, *v;
-                       ref = resolve_ref_unsafe("HEAD", sha1, 1, NULL);
+                       ref = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+                                                sha1, NULL);
                        if (ref && skip_prefix(ref, "refs/heads/", &v))
                                branch_name = xstrdup(v);
                        else