From: Tim Henigan Date: Thu, 22 Mar 2012 19:52:21 +0000 (-0400) Subject: difftool: eliminate setup_environment function X-Git-Tag: v1.7.11-rc0~55^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e9653615fafcbac6109da99fac4fa66b0b432048?hp=--cc difftool: eliminate setup_environment function Removing this function shortens the code and makes it easier to read. Now all environment variables are set as part of procedural operation. Signed-off-by: Tim Henigan Signed-off-by: Junio C Hamano --- e9653615fafcbac6109da99fac4fa66b0b432048 diff --git a/git-difftool.perl b/git-difftool.perl index a3ad389569..aba3d2f8cb 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -29,12 +29,6 @@ sub usage exit($exitcode); } -sub setup_environment -{ - $ENV{GIT_PAGER} = ''; - $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper'; -} - # parse command-line options. all unrecognized options and arguments # are passed through to the 'git diff' command. my ($difftool_cmd, $extcmd, $gui, $help, $prompt); @@ -79,7 +73,8 @@ sub setup_environment } } -setup_environment(); +$ENV{GIT_PAGER} = ''; +$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper'; my @command = ('git', 'diff', @ARGV); # ActiveState Perl for Win32 does not implement POSIX semantics of