From: Junio C Hamano <gitster@pobox.com>
To: Aleks Todorov <aleks.todorov.1337@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Add Commit Summary in blame?
Date: Tue, 18 Feb 2025 10:08:07 -0800 [thread overview]
Message-ID: <xmqqfrkbxh14.fsf@gitster.g> (raw)
In-Reply-To: <CAO0eup=6NcCdBASxvAxB8moku74zpxAr+MFiV-kkXVfjY1UF=w@mail.gmail.com> (Aleks Todorov's message of "Sun, 16 Feb 2025 21:13:04 +0000")
Aleks Todorov <aleks.todorov.1337@gmail.com> 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...
prev parent reply other threads:[~2025-02-18 18:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 23:07 Add Commit Summary in blame? Aleks Todorov
2024-04-06 0:19 ` Junio C Hamano
2025-02-16 21:13 ` Aleks Todorov
2025-02-18 18:08 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqfrkbxh14.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=aleks.todorov.1337@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.
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 NNTP newsgroup(s).