Subject: Re: [BUG] git gui blame fails for multi-word textconv filter

From: Pat Thoyts <[email-masked]>
Date: Thu, 05 Aug 2010 23:58:42 +0100

Clément Poulain <[email-masked]> writes:

>Le 04/08/2010 21:25, Kirill Smelkov a écrit :
>> Hello,
>>
>> I use
>>
>>      [diff "astextplain"]
>>          textconv = run-mailcap --action=cat
>>
>> in my ~/.gitconfig, and this works for git `git blame` because of 41a457
>> in git.git (textconv: use shell to run helper), but fails with git gui:
>>
>>      $ git gui blame 21980.2--ИМС-МР231.doc
>>      Error in startup script: couldn't execute "run-mailcap --action=cat": no such file or directory
>>    
>I wonder if spaces can be the reason of this. Looks like Tcl is
>looking for an executable called "run-mailcap --action=cat", and
>doesn't distinguish path from options.

indeed. We passed a 2-element list and the first element is the
command. To permit this we need to append the pathname to the command
instead.
  open |[linsert $path 0 $cmd_plus_args_list]
is a safe way to do that.

I should have thought of that too and not just repos with spaces in the path.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD