Thread (4 messages) 4 messages, 2 authors, 2017-03-07

Re: [PATCH] blame: draft of line format

From: Jeff King <hidden>
Date: 2017-01-31 19:44:11

On Mon, Jan 30, 2017 at 08:28:30PM -0600, Edmundo Carmona Antoranz wrote:
quoted hunk ↗ jump to hunk
+static void pretty_info(char* revid, struct blame_entry *ent, struct strbuf *rev_buffer)
+{
+	struct pretty_print_context ctx = {0};
+	struct rev_info rev;
+
+	struct strbuf format = STRBUF_INIT;
+	strbuf_addstr(&format, format_line);
+	ctx.fmt = CMIT_FMT_USERFORMAT;
+	get_commit_format(format.buf, &rev);
+	pretty_print_commit(&ctx, ent->suspect->commit, rev_buffer);
+	strbuf_release(&format);
+}
I think this may be less awkward if you use format_commit_message() as
the entry point. Then you do not need a rev_info struct at all, it
touches fewer global variables, etc.

I don't know if that would cause the other difficulties you mentioned,
though.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help