]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pretty.c
Notes API: Allow multiple concurrent notes trees with new struct notes_tree
[thirdparty/git.git] / pretty.c
index b2ee7fe9de2830dbc276b49d54a18d1130b751a2..f999485a54acdb63c699ee1fce00f80433889e81 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -83,7 +83,7 @@ static int get_one_line(const char *msg)
 }
 
 /* High bit set, or ISO-2022-INT */
-int non_ascii(int ch)
+static int non_ascii(int ch)
 {
        return !isascii(ch) || ch == '\033';
 }
@@ -775,8 +775,9 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
                }
                return 0;       /* unknown %g placeholder */
        case 'N':
-               get_commit_notes(commit, sb, git_log_output_encoding ?
-                            git_log_output_encoding : git_commit_encoding, 0);
+               format_note(NULL, commit->object.sha1, sb,
+                           git_log_output_encoding ? git_log_output_encoding
+                                                   : git_commit_encoding, 0);
                return 1;
        }
 
@@ -1095,8 +1096,8 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
                strbuf_addch(sb, '\n');
 
        if (context->show_notes)
-               get_commit_notes(commit, sb, encoding,
-                                NOTES_SHOW_HEADER | NOTES_INDENT);
+               format_note(NULL, commit->object.sha1, sb, encoding,
+                           NOTES_SHOW_HEADER | NOTES_INDENT);
 
        free(reencoded);
 }