Skip to content

Commit

Permalink
difftool: stop appending '.exe' to git
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
thenigan authored and gitster committed Mar 23, 2012
1 parent db60708 commit 11bf870
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions git-difftool.perl
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,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, $prompt);
Expand Down Expand Up @@ -89,7 +80,7 @@ sub exe
}

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
Expand Down

0 comments on commit 11bf870

Please sign in to comment.