Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-28 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > - if (ca.drv) { > + if (ca.drv && ca.drv->smudge && strlen(ca.drv->smudge)) { You are not interested in its length, but if it is an empty string or not, so I'd tweak this like so: > + if (ca.drv && ca.drv->smudge && *ca.drv->smudge) { -- To unsubsc

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-28 Thread Junio C Hamano
Lars Schneider writes: > If the clean/smudge command of a Git filter driver (filter..smudge and > filter..clean) is set to an empty string ("") and the filter driver is > not required (filter..required=false) then Git will run successfully. > However, Git will print an error for every file that i

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-28 Thread Lars Schneider
On 25 Jan 2016, at 02:25, Junio C Hamano wrote: > larsxschnei...@gmail.com writes: > >> From: Lars Schneider >> >> A clean/smudge filter can be disabled if set to an empty string. However, >> Git will try to run the empty string as command which results in a error >> message per processed fil

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-27 Thread Lars Schneider
On 24 Jan 2016, at 22:45, Jeff King wrote: > On Sun, Jan 24, 2016 at 01:22:50PM +0100, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> A clean/smudge filter can be disabled if set to an empty string. However, >> Git will try to run the empty string as command which results in

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-27 Thread Lars Schneider
On 24 Jan 2016, at 22:35, Eric Sunshine wrote: > On Sun, Jan 24, 2016 at 10:06 AM, Torsten Bögershausen wrote: >> On 24.01.16 13:22, larsxschnei...@gmail.com wrote: >>> From: Lars Schneider >>> diff --git a/convert.c b/convert.c >>> @@ -786,7 +786,7 @@ int convert_to_git(const char *path, cons

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-27 Thread Lars Schneider
On 24 Jan 2016, at 16:06, Torsten Bögershausen wrote: > On 24.01.16 13:22, larsxschnei...@gmail.com wrote: >> From: Lars Schneider > Some minor nits inside: >> >> A clean/smudge filter can be disabled if set to an empty string. > "set to an empty string" refers to "git config" (in opposite t

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-24 Thread Junio C Hamano
larsxschnei...@gmail.com writes: > From: Lars Schneider > > A clean/smudge filter can be disabled if set to an empty string. However, > Git will try to run the empty string as command which results in a error > message per processed file. The above two sentences do not make any sense to me. You

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-24 Thread Jeff King
On Sun, Jan 24, 2016 at 01:22:50PM +0100, larsxschnei...@gmail.com wrote: > From: Lars Schneider > > A clean/smudge filter can be disabled if set to an empty string. However, > Git will try to run the empty string as command which results in a error > message per processed file. > > Teach Git t

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-24 Thread Eric Sunshine
On Sun, Jan 24, 2016 at 10:06 AM, Torsten Bögershausen wrote: > On 24.01.16 13:22, larsxschnei...@gmail.com wrote: >> From: Lars Schneider >> diff --git a/convert.c b/convert.c >> @@ -786,7 +786,7 @@ int convert_to_git(const char *path, const char *src, >> size_t len, >> struct conv_attrs

Re: [PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-24 Thread Torsten Bögershausen
On 24.01.16 13:22, larsxschnei...@gmail.com wrote: > From: Lars Schneider Some minor nits inside: > > A clean/smudge filter can be disabled if set to an empty string. "set to an empty string" refers to "git config" (in opposite to the filter as such, which is specified in .gitattributes. Does i

[PATCH] convert: legitimately disable clean/smudge filter with an empty override

2016-01-24 Thread larsxschneider
From: Lars Schneider A clean/smudge filter can be disabled if set to an empty string. However, Git will try to run the empty string as command which results in a error message per processed file. Teach Git to consider an empty clean/smudge filter as legitimately disabled and do not print an erro