git-svn: add --shared and --template= options to pass to init-db
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong committed
May 31, 2006 at 15:49 UTC
f8ab6b732f0a2cead5089aea2ce0c3c3aa97cafe
1 file changed
+8
-2
contrib/git-svn/git-svn.perl
+8
-2
@@ -35,6 +35,7 @@ my $sha1_short = qr/[a-f\d]{4,40}/;
35
my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
36
$_find_copies_harder, $_l, $_cp_similarity,
37
$_repack, $_repack_nr, $_repack_flags,
38
+ $_template, $_shared,
39
$_version, $_upgrade, $_authors, $_branch_all_refs);
40
my (@_branch_from, %tree_map, %users);
41
my ($_svn_co_url_revs, $_svn_pg_peg_revs);
@@ -54,7 +55,9 @@ my %cmd = (
55
fetch => [ \&fetch, "Download new revisions from SVN",
56
{ 'revision|r=s' => \$_revision, %fc_opts } ],
57
init => [ \&init, "Initialize a repo for tracking" .
57
- " (requires URL argument)", { } ],
58
+ " (requires URL argument)",
59
+ { 'template=s' => \$_template,
60
+ 'shared' => \$_shared } ],
61
commit => [ \&commit, "Commit git revisions to SVN",
62
{ 'stdin|' => \$_stdin,
63
'edit|e' => \$_edit,
@@ -217,7 +220,10 @@ sub init {
220
$SVN_URL = shift or die "SVN repository location required " .
221
"as a command-line argument\n";
222
unless (-d $GIT_DIR) {
220
- sys('git-init-db');
223
+ my @init_db = ('git-init-db');
224
+ push @init_db, "--template=$_template" if defined $_template;
225
+ push @init_db, "--shared" if defined $_shared;
226
+ sys(@init_db);
227
}
228
setup_git_svn();
229
}