From: Lars Schneider Date: Fri, 29 Jan 2016 08:21:37 +0000 (+0100) Subject: convert: treat an empty string for clean/smudge filters as "cat" X-Git-Tag: v2.8.0-rc0~61^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1a8630dc3b1cc6f1361a4e5d94630133c24c97d9?ds=inline;hp=1a8630dc3b1cc6f1361a4e5d94630133c24c97d9 convert: treat an empty string for clean/smudge filters as "cat" Once a lower-priority configuration file defines a clean or smudge filter, there is no convenient way to override it to produce as-is output. Even though the configuration mechanism implements "the last one wins" semantics, you cannot set them to an empty string and expect them to work, as apply_filter() would try to run the empty string as an external command and fail. The conversion is not done, but the function would still report a failure to convert. Even though resetting the variable to "cat" (i.e. pass the data back as-is and report success) is an obvious and a viable way to solve this, it is wasteful to spawn an external process just as a workaround. Instead, teach apply_filter() to treat an empty string as a no-op filter that always returns successfully its input as-is without conversion. Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano ---