summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-02-13 22:28:18 +0100
committerJunio C Hamano <gitster@pobox.com>2010-02-13 19:36:12 -0800
commitcd30539214bb09881b84c796a50d30e409dee3fa (patch)
tree4fe2704aa3dd0e2ca29a4811ad58bdeb0ac32ed7 /pretty.c
parent61a7cca0c6504aee7bae7837582230561bdb81d4 (diff)
downloadgit-cd30539214bb09881b84c796a50d30e409dee3fa.tar.gz
Notes API: Allow multiple concurrent notes trees with new struct notes_tree
The new struct notes_tree encapsulates access to a specific notes tree. It is provided to allow callers to make use of several different notes trees simultaneously. A struct notes_tree * parameter is added to every function in the notes API. In all cases, NULL can be passed, in which case the fallback "default" notes tree (default_notes_tree) is used. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index 076b918b52..f999485a54 100644
--- a/pretty.c
+++ b/pretty.c
@@ -775,8 +775,9 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
}
return 0; /* unknown %g placeholder */
case 'N':
- format_note(commit->object.sha1, 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,7 +1096,7 @@ void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
strbuf_addch(sb, '\n');
if (context->show_notes)
- format_note(commit->object.sha1, sb, encoding,
+ format_note(NULL, commit->object.sha1, sb, encoding,
NOTES_SHOW_HEADER | NOTES_INDENT);
free(reencoded);