]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-checkout.c
Refactor pretty_print_commit arguments into a struct
[thirdparty/git.git] / builtin-checkout.c
index d050c3789fcdaf1b50c12a20c28cbeaf774048eb..075a49f1a02fcdfb614a8482286cffe4100921c8 100644 (file)
@@ -302,8 +302,9 @@ static void show_local_changes(struct object *head)
 static void describe_detached_head(char *msg, struct commit *commit)
 {
        struct strbuf sb = STRBUF_INIT;
+       struct pretty_print_context ctx = {0};
        parse_commit(commit);
-       pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, 0, NULL, NULL, 0, 0);
+       pretty_print_commit(CMIT_FMT_ONELINE, commit, &sb, &ctx);
        fprintf(stderr, "%s %s... %s\n", msg,
                find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV), sb.buf);
        strbuf_release(&sb);