From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sun, 12 Jan 2014 19:35:02 +0000 Subject: [PATCH 4/6] filter: add fprintf_filter function In-Reply-To: References: Message-ID: <20140112193502.GS7608@serenity.lan> 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.