Subject: Re: Add Commit Summary in blame?

From: Junio C Hamano <[email-masked]>
Date: Tue, 18 Feb 2025 10:08:07 -0800

Aleks Todorov <[email-masked]> writes:

> ...
> however if the implementation is shared, that means we need a way to sanitize
> user input to ensure they are not using flags which are not allowed, and we
> will also need to pollute the implementation with length specifiers everywhere
> since each field in the blame output needs to be width-aligned.

I was imagining that the aligning is responsibility of the end-users
who give whatever random format strings to the command, if you are
to reuse the existing helper functions out of the implementation of
the "git log" family of commands, as %</%> and its friends would be
available for free.  I admit that it has been forever since I looked
at the code paths that implement wrapping and padding specifiers
last time, and I do not know offhand how cleanly they are written
and how reusable they are, though.

If you are doing this to feed some GUI implementation, however, I
suspect that a more productive way would be to make the GUI tool
read from the "--incremental" format.  But as I do not know your
motivation...