Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 04:44:24AM -0800, Jeff King wrote: > > Wouldn't it then be better ti use strlen("tar") rather than a 3? Or > > at least a comment? > [...] > We could also potentially encapsulate it in a function. I think the diff > code has a very similar block. Here's a series that does

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Jeff King
On Mon, Jan 14, 2013 at 09:17:57AM +0100, Joachim Schmitz wrote: > >For the curious, the original version of the patch[1] read: > > > >+ if (prefixcmp(var, "tarfilter.")) > >+ return 0; > >+ dot = strrchr(var, '.'); > >+ if (dot == var + 9) > >+ return

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-14 Thread Joachim Schmitz
Jeff King wrote: On Sun, Jan 13, 2013 at 06:42:01PM +0100, René Scharfe wrote: When parsing these config variable names, we currently check that the second dot is found nine characters into the name, disallowing filter names with a length of five characters. Additionally, git archive crashes w

Re: [PATCH] archive-tar: fix sanity check in config parsing

2013-01-13 Thread Jeff King
On Sun, Jan 13, 2013 at 06:42:01PM +0100, René Scharfe wrote: > When parsing these config variable names, we currently check that > the second dot is found nine characters into the name, disallowing > filter names with a length of five characters. Additionally, > git archive crashes when the seco

[PATCH] archive-tar: fix sanity check in config parsing

2013-01-13 Thread René Scharfe
git archive supports passing generated tar archives through filter commands like gzip. Additional filters can be set up using the configuration variables tar..command and tar..remote. When parsing these config variable names, we currently check that the second dot is found nine characters into th