From: Jeff King <peff@peff.net>
To: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] blame: draft of line format
Date: Tue, 31 Jan 2017 20:41:39 +0100 [thread overview]
Message-ID: <20170131194138.fbcbdnkfjgizxnoa@sigill.intra.peff.net> (raw)
In-Reply-To: <20170131022830.8538-1-eantoranz@gmail.com>
On Mon, Jan 30, 2017 at 08:28:30PM -0600, Edmundo Carmona Antoranz wrote:
> +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
next prev parent reply other threads:[~2017-01-31 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 2:28 [PATCH] blame: draft of line format Edmundo Carmona Antoranz
2017-01-31 2:34 ` Edmundo Carmona Antoranz
2017-01-31 19:41 ` Jeff King [this message]
2017-03-06 23:29 ` Edmundo Carmona Antoranz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170131194138.fbcbdnkfjgizxnoa@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).