Commit _subject_ filter, everywhere

Bjørn Forsman bjorn.forsman at gmail.com
Sat Dec 2 13:33:28 CET 2017


Hi John,

On 2 December 2017 at 12:31, John Keeping <john at keeping.me.uk> wrote:
> I was going to suggest introducing a new subject-filter which is used to
> filter the commit subject wherever it is displayed, but there is a
> subtlety which makes this more complicated in the summary, log and refs
> pages than it is in the commit page.
>
> When we are showing a single-line summary of a commit, the subject is a
> hyperlink so adding new content outside the existing subject is not
> possible with the obvious filter implementation.
>
> One option would be to push the <a></a> tag generation down into the
> filter, but I'd rather avoid that if possible.

Aha, I see.

> What do you think about adding a "filter" which is called before the
> commit subject is printed and allows outputting additional HTML content?
> ("filter" is in quotes since there will not be any content copied
> through the program.)

Sounds good to me. It covers my use case.

Perhaps this new "filter" should not have filter in its name.
Suggestion: commit-prefix=.

Oh, and this new command must somehow receive the commit id from cgit.
New environment variable?

Best regards,
Bjørn Forsman


More information about the CGit mailing list