Skip to content

Commit 5e55885

Browse files
committed
Move initialization of Git::SVN variables into Git::SVN.
Also it can compile on its own now, yay!
1 parent 237131f commit 5e55885

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

git-svn.perl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020

2121
my $git_dir_user_set = 1 if defined $ENV{GIT_DIR};
2222
$ENV{GIT_DIR} ||= '.git';
23-
$Git::SVN::default_repo_id = 'svn';
24-
$Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
2523
$Git::SVN::Ra::_log_window_size = 100;
26-
$Git::SVN::_minimize_url = 'unset';
2724

2825
if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {
2926
$ENV{SVN_SSH} = $ENV{GIT_SSH};
@@ -114,7 +111,6 @@ BEGIN
114111
# This is a refactoring artifact so Git::SVN can get at this git-svn switch.
115112
sub opt_prefix { return $_prefix || '' }
116113

117-
$Git::SVN::_follow_parent = 1;
118114
$Git::SVN::Fetcher::_placeholder_filename = ".gitignore";
119115
$_q ||= 0;
120116
my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,

perl/Git/SVN.pm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use strict;
33
use warnings;
44
use Fcntl qw/:DEFAULT :seek/;
55
use constant rev_map_fmt => 'NH40';
6-
use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent
6+
use vars qw/$_no_metadata
77
$_repack $_repack_flags $_use_svm_props $_head
8-
$_use_svnsync_props $no_reuse_existing $_minimize_url
8+
$_use_svnsync_props $no_reuse_existing
99
$_use_log_author $_add_author_from $_localtime/;
1010
use Carp qw/croak/;
1111
use File::Path qw/mkpath/;
@@ -30,6 +30,11 @@ BEGIN {
3030
$can_use_yaml = eval { require Git::SVN::Memoize::YAML; 1};
3131
}
3232

33+
our $_follow_parent = 1;
34+
our $_minimize_url = 'unset';
35+
our $default_repo_id = 'svn';
36+
our $default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
37+
3338
my ($_gc_nr, $_gc_period);
3439

3540
# properties that we do not log:

t/Git-SVN/00compile.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use strict;
44
use warnings;
55

6-
use Test::More tests => 1;
6+
use Test::More tests => 2;
77

88
require_ok 'Git::SVN::Utils';
9+
require_ok 'Git::SVN';

0 commit comments

Comments
 (0)