mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
Load all the modules in one place and before running code.
Just makes the code easier to follow. No functional change. Also eliminate an unused lexical $SVN. Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
parent
b772cb9994
commit
e96cdba110
44
git-svn.perl
44
git-svn.perl
@ -10,11 +10,26 @@ use vars qw/ $AUTHOR $VERSION
|
||||
$AUTHOR = 'Eric Wong <normalperson@yhbt.net>';
|
||||
$VERSION = '@@GIT_VERSION@@';
|
||||
|
||||
use Carp qw/croak/;
|
||||
use Digest::MD5;
|
||||
use IO::File qw//;
|
||||
use File::Basename qw/dirname basename/;
|
||||
use File::Path qw/mkpath/;
|
||||
use File::Spec;
|
||||
use File::Find;
|
||||
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
|
||||
use IPC::Open3;
|
||||
use Memoize;
|
||||
|
||||
use Git::SVN;
|
||||
use Git::SVN::Editor;
|
||||
use Git::SVN::Fetcher;
|
||||
use Git::SVN::Ra;
|
||||
use Git::SVN::Prompt;
|
||||
use Git::SVN::Log;
|
||||
use Git::SVN::Migration;
|
||||
use Git::SVN::Utils qw(fatal can_compress);
|
||||
|
||||
use Git::SVN::Utils qw(fatal can_compress);
|
||||
use Git qw(
|
||||
git_cmd_try
|
||||
command
|
||||
@ -26,6 +41,11 @@ use Git qw(
|
||||
command_close_bidi_pipe
|
||||
);
|
||||
|
||||
BEGIN {
|
||||
Memoize::memoize 'Git::config';
|
||||
Memoize::memoize 'Git::config_bool';
|
||||
}
|
||||
|
||||
|
||||
# From which subdir have we been invoked?
|
||||
my $cmd_dir_prefix = eval {
|
||||
@ -79,28 +99,6 @@ sub _req_svn {
|
||||
}
|
||||
}
|
||||
|
||||
use Carp qw/croak/;
|
||||
use Digest::MD5;
|
||||
use IO::File qw//;
|
||||
use File::Basename qw/dirname basename/;
|
||||
use File::Path qw/mkpath/;
|
||||
use File::Spec;
|
||||
use File::Find;
|
||||
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
|
||||
use IPC::Open3;
|
||||
use Git::SVN::Editor qw//;
|
||||
use Git::SVN::Fetcher qw//;
|
||||
use Git::SVN::Ra qw//;
|
||||
use Git::SVN::Prompt qw//;
|
||||
use Memoize; # core since 5.8.0, Jul 2002
|
||||
|
||||
BEGIN {
|
||||
Memoize::memoize 'Git::config';
|
||||
Memoize::memoize 'Git::config_bool';
|
||||
}
|
||||
|
||||
my ($SVN);
|
||||
|
||||
$sha1 = qr/[a-f\d]{40}/;
|
||||
$sha1_short = qr/[a-f\d]{4,40}/;
|
||||
my ($_stdin, $_help, $_edit,
|
||||
|
Loading…
Reference in New Issue
Block a user