[PATCH 3/4] Refactor cgit_parse_snapshots_mask()

2014-01-10 Thread Lukas Fleischer
Use Git string lists instead of str{spn,cspn,ncmp}() magic. This significantly improves readability. Signed-off-by: Lukas Fleischer c...@cryptocrack.de --- shared.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/shared.c b/shared.c index

Re: RESEND: syntax-highlighting.py

2014-01-10 Thread Stefan Tatschner
Am 08.01.2014 16:19, schrieb Jason A. Donenfeld: Okay reading this closer, it seems what the one in-tree could benefit from is: - Expanded list of filename mappings, made more generic than what you have in your script, but basically the same idea. -- { pkgbuild: bashlexer, cmakelists.txt,

[PATCH 2/2] cgit.c: Fix comment on bit mask hack

2014-01-10 Thread Lukas Fleischer
* Formatting and spelling fixes. * A bit mask with the size of one byte only allows for storing 8 (not 255!) different flags. Signed-off-by: Lukas Fleischer c...@cryptocrack.de --- cgit.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cgit.c b/cgit.c

[PATCH 1/2] cgit.c: Use else for mutually exclusive branches

2014-01-10 Thread Lukas Fleischer
When parsing command line arguments, no pair of command line options can ever match simultaneously. Use else if blocks to reflect this. This change improves both readability and speed. Signed-off-by: Lukas Fleischer c...@cryptocrack.de --- Based on the patches I sent earlier today. cgit.c | 29

[PATCH] Disallow downloading disabled snapshot formats

2014-01-10 Thread Lukas Fleischer
We did only display enabled snapshot formats but we did not prevent from downloading disabled formats when requested. Fix this by adding an appropriate check. Also, add a test case that checks whether downloading disabled snapshot formats is denied, as expected. Signed-off-by: Lukas Fleischer

Re: [PATCH] Disallow downloading disabled snapshot formats

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 03:38:06PM +0100, Lukas Fleischer wrote: We did only display enabled snapshot formats but we did not prevent from downloading disabled formats when requested. Fix this by adding an appropriate check. Also, add a test case that checks whether downloading disabled

Re: RFE: .so filters

2014-01-10 Thread Jason A. Donenfeld
On Fri, Jan 10, 2014 at 10:06 AM, John Keeping j...@keeping.me.uk wrote: This seems drastically over complicated. So here's the situation. There's a lot of state that we're taking advantage of in using processes that terminate, that needs to be replicated: *a* Sending arguments to the

Re: [PATCH 1/4] Replace most uses of strncmp() with prefixcmp()

2014-01-10 Thread Jason A. Donenfeld
Looks good, merged. ___ CGit mailing list CGit@lists.zx2c4.com http://lists.zx2c4.com/mailman/listinfo/cgit

Re: [PATCH 1/2] cgit.c: Use else for mutually exclusive branches

2014-01-10 Thread Jason A. Donenfeld
Seems reasonable. Merged. ___ CGit mailing list CGit@lists.zx2c4.com http://lists.zx2c4.com/mailman/listinfo/cgit

Re: [PATCH] Disallow downloading disabled snapshot formats

2014-01-10 Thread Jason A. Donenfeld
On Fri, Jan 10, 2014 at 3:38 PM, Lukas Fleischer c...@cryptocrack.de wrote: We did only display enabled snapshot formats but we did not prevent from downloading disabled formats when requested. Fix this by adding an appropriate check. Previously:

sendfile patch revival?

2014-01-10 Thread Jason A. Donenfeld
Looking through the archives, I stumbled across this neglected patch: http://lists.zx2c4.com/pipermail/cgit/2012-June/000642.html Anybody want to investigate and brush this up for merging currently? ___ CGit mailing list CGit@lists.zx2c4.com

Re: RFE: .so filters

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 06:12:25PM +0100, Florian Pritz wrote: On 10.01.2014 16:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 10:06 AM, John Keeping j...@keeping.me.uk wrote: This seems drastically over complicated. So here's the situation. There's a lot of state that we're

Re: RFE: .so filters

2014-01-10 Thread Jason A. Donenfeld
On Fri, Jan 10, 2014 at 6:20 PM, John Keeping j...@keeping.me.uk wrote: I was also wondering if supporting unix:/path/to/socket would be useful, then the filter would connect on a Unix socket, run and disconnect, on the assumption that the administrator has a daemon running to do the

Re: RFE: .so filters

2014-01-10 Thread Florian Pritz
On 10.01.2014 18:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 6:12 PM, Florian Pritz bluew...@xinu.at wrote: Isn't this (fast scripting with lots of features) when people normally start using lua? This would have the same challenges as using .so files, w.r.t. hooking write() (or

Re: RFE: .so filters

2014-01-10 Thread John Keeping
On Fri, Jan 10, 2014 at 09:03:24PM +0100, Florian Pritz wrote: On 10.01.2014 18:57, Jason A. Donenfeld wrote: On Fri, Jan 10, 2014 at 6:12 PM, Florian Pritz bluew...@xinu.at wrote: Isn't this (fast scripting with lots of features) when people normally start using lua? This would

Re: RFE: .so filters

2014-01-10 Thread Florian Pritz
On 10.01.2014 21:11, John Keeping wrote: Forking and using Lua in the child is an interesting idea. I need to investigate how Lua generally deals with I/O, but it feels like it will be simpler to use a simple function interface than deal with slurping in the input in Lua. Looks rather easy