author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Tue, 14 Dec 2010 18:27:48 +0000 (18:27 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 14 Dec 2010 19:13:41 +0000 (11:13 -0800) | ||
commit | d531174fe386af00755619d6a204db74a30954f8 | |
tree | 2d2a529cc607efa36e81ca415dc99991d926e8c0 | tree | snapshot |
parent | c6d059bbccb8460959b9aedfeefbb4d6aac6e842 | commit | diff |
difftool: Fix failure on Cygwin
In particular, test 14 'difftool last flag wins' in t7800 fails.
This is caused by git-difftool.perl passing both GIT_DIFFTOOL_NO_PROMPT
(='true') and GIT_DIFFTOOL_PROMPT (='true') to the difftool helper
script. Despite the appropriate key being deleted from the ENV
hash, it seems that once a key has been set in the hash, it gets
passed along to the system() call. (ie deleting the key does not
do the equivalent of unsetenv()).
In order to fix the problem, we keep track of the required prompt
state while processing the arguments, and then set the relevant
ENV hash key only once at the end.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In particular, test 14 'difftool last flag wins' in t7800 fails.
This is caused by git-difftool.perl passing both GIT_DIFFTOOL_NO_PROMPT
(='true') and GIT_DIFFTOOL_PROMPT (='true') to the difftool helper
script. Despite the appropriate key being deleted from the ENV
hash, it seems that once a key has been set in the hash, it gets
passed along to the system() call. (ie deleting the key does not
do the equivalent of unsetenv()).
In order to fix the problem, we keep track of the required prompt
state while processing the arguments, and then set the relevant
ENV hash key only once at the end.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-difftool.perl | diff | blob | history |