summaryrefslogtreecommitdiff
path: root/notes.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-30 17:30:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-02 00:36:06 (GMT)
commitfb61e4d3abe2349eb0fabe0be8981626b4074fa7 (patch)
tree30ccde13cd2e1f14e1b5231024a2b57c30e3cd04 /notes.c
parent9ef7223058a44990dc4650ecb1209c97ceb636b3 (diff)
downloadgit-fb61e4d3abe2349eb0fabe0be8981626b4074fa7.zip
git-fb61e4d3abe2349eb0fabe0be8981626b4074fa7.tar.gz
git-fb61e4d3abe2349eb0fabe0be8981626b4074fa7.tar.bz2
notes: convert format_display_notes to struct object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/notes.c b/notes.c
index fe4db2c..b5cabaf 100644
--- a/notes.c
+++ b/notes.c
@@ -1215,7 +1215,7 @@ void free_notes(struct notes_tree *t)
* (raw != 0) gives the %N userformat; otherwise, the note message is given
* for human consumption.
*/
-static void format_note(struct notes_tree *t, const unsigned char *object_sha1,
+static void format_note(struct notes_tree *t, const struct object_id *object_oid,
struct strbuf *sb, const char *output_encoding, int raw)
{
static const char utf8[] = "utf-8";
@@ -1229,7 +1229,7 @@ static void format_note(struct notes_tree *t, const unsigned char *object_sha1,
if (!t->initialized)
init_notes(t, NULL, NULL, 0);
- oid = get_note(t, object_sha1);
+ oid = get_note(t, object_oid->hash);
if (!oid)
return;
@@ -1277,13 +1277,13 @@ static void format_note(struct notes_tree *t, const unsigned char *object_sha1,
free(msg);
}
-void format_display_notes(const unsigned char *object_sha1,
+void format_display_notes(const struct object_id *object_oid,
struct strbuf *sb, const char *output_encoding, int raw)
{
int i;
assert(display_notes_trees);
for (i = 0; display_notes_trees[i]; i++)
- format_note(display_notes_trees[i], object_sha1, sb,
+ format_note(display_notes_trees[i], object_oid, sb,
output_encoding, raw);
}