Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
difftool: eliminate setup_environment function
author
Tim Henigan
<tim.henigan@gmail.com>
Thu, 22 Mar 2012 19:52:21 +0000
(15:52 -0400)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 23 Mar 2012 18:46:26 +0000
(11:46 -0700)
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>
git-difftool.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
11bf870
)
diff --git
a/git-difftool.perl
b/git-difftool.perl
index a3ad389569dda38ea08cba59530a43005e814c60..aba3d2f8cb114774ca316abb4ac72f7ad66bb769 100755
(executable)
--- a/
git-difftool.perl
+++ b/
git-difftool.perl
@@
-29,12
+29,6
@@
sub usage
exit($exitcode);
}
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);
# 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
my @command = ('git', 'diff', @ARGV);
# ActiveState Perl for Win32 does not implement POSIX semantics of