[PATCH] filter: refactor cgit_new_filter()

2014-01-14 Thread Jason A. Donenfeld
From: Lukas Fleischer c...@cryptocrack.de Use prefixcmp() as a preparation for using strip_prefix() later. Also, interpret the command as a file name if it contains a colon but none of the filter prefixes matches instead of bailing out and adding a special check for Windows. Signed-off-by: Lukas

Re: [PATCH] filter: refactor cgit_new_filter()

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 02:00:48PM +0100, Jason A. Donenfeld wrote: From: Lukas Fleischer c...@cryptocrack.de Use prefixcmp() as a preparation for using strip_prefix() later. Also, interpret the command as a file name if it contains a colon but none of the filter prefixes matches instead of

Re: [PATCH] filter: refactor cgit_new_filter()

2014-01-14 Thread John Keeping
On Tue, Jan 14, 2014 at 09:54:21PM +0100, Jason A. Donenfeld wrote: On Tue, Jan 14, 2014 at 9:39 PM, John Keeping j...@keeping.me.uk wrote: I like the simplification, but I'm not sure the result is better. Even without the rest we should replace the strncmp with prefixcmp though. Agreed.