Skip to content

Commit e965361

Browse files
thenigangitster
authored andcommitted
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 <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 11bf870 commit e965361

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

git-difftool.perl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ sub usage
2929
exit($exitcode);
3030
}
3131

32-
sub setup_environment
33-
{
34-
$ENV{GIT_PAGER} = '';
35-
$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
36-
}
37-
3832
# parse command-line options. all unrecognized options and arguments
3933
# are passed through to the 'git diff' command.
4034
my ($difftool_cmd, $extcmd, $gui, $help, $prompt);
@@ -79,7 +73,8 @@ sub setup_environment
7973
}
8074
}
8175

82-
setup_environment();
76+
$ENV{GIT_PAGER} = '';
77+
$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
8378
my @command = ('git', 'diff', @ARGV);
8479

8580
# ActiveState Perl for Win32 does not implement POSIX semantics of

0 commit comments

Comments
 (0)