[PATCH 4/9 v2] difftool: stop appending '.exe' to git
- From
Tim Henigan <tim.henigan@gmail.com>
- Date
- Mar 18, 2012, 01:55 UTC
- Message-ID
- <1332035734-5443-5-git-send-email-tim.henigan@gmail.com>
- In-Reply-To
- <1332035734-5443-1-git-send-email-tim.henigan@gmail.com>
The system call to Git works the same whether or not ".exe" is appended to "git". The extra code is not necessary.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com> --- git-difftool.perl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/git-difftool.perl b/git-difftool.perl index 53fcd7e..99ff587 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -33,15 +33,6 @@ sub setup_environment $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper'; } -sub exe -{ - my $exe = shift; - if ($^O eq 'MSWin32' || $^O eq 'msys') { - return "$exe.exe"; - } - return $exe; -} - # parse command-line options. all unrecognized options and arguments # are passed through to the 'git diff' command. my ($difftool_cmd, $extcmd, $gui, $help, $no_prompt, $prompt); @@ -86,7 +77,7 @@ elsif (defined($no_prompt)) { } setup_environment(); -my @command = (exe('git'), 'diff', @ARGV); +my @command = ('git', 'diff', @ARGV); # ActiveState Perl for Win32 does not implement POSIX semantics of # exec* system call. It just spawns the given executable and finishes
-- 1.7.9.1.290.gbd444