[PATCH 4/6] filter: add fprintf_filter function

John Keeping john at keeping.me.uk
Sun Jan 12 20:35:02 CET 2014

On Sun, Jan 12, 2014 at 08:23:02PM +0100, Jason A. Donenfeld wrote:
> What's the purpose of this? Why not just keep the original string that
> was passed to about-filter=... in the cmd variable as we have now? The
> thing that's variable from filter to filter is argv, the type (commit,
> about, etc), and the mechanism (lua, stdout, etc). But the variable
> aspects don't require changing ->cmd do they?

I'm looking at splitting up the data so there is a filter object that
contains function pointers to implementation functions and then some
data that is specific to to given filter type.  With that change, cmd
moves to the "exec filter" structure and is no longer accessible.  I'm
expecting some filter types to have a structured value in the config
file that will be parsed to multiple fields which will be glued back
together in the fprintf function for that filter type.

More information about the CGit mailing list