git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 8/13] git-svn: add --shared and --template= options to pass to init-db

From
EWEric Wong <normalperson@yhbt.net>
Date
Jun 13, 2006, 18:02 UTC
Message-ID
<1150221746915-git-send-email-normalperson@yhbt.net>
In-Reply-To
<11502217352245-git-send-email-normalperson@yhbt.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 contrib/git-svn/git-svn.perl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/contrib/git-svn/git-svn.perl b/contrib/git-svn/git-svn.perl
index a04cf1d..d8f103e 100755
--- a/contrib/git-svn/git-svn.perl
+++ b/contrib/git-svn/git-svn.perl
@@ -35,6 +35,7 @@ my $sha1_short = qr/[a-f\d]{4,40}/;
 my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
 	$_find_copies_harder, $_l, $_cp_similarity,
 	$_repack, $_repack_nr, $_repack_flags,
+	$_template, $_shared,
 	$_version, $_upgrade, $_authors, $_branch_all_refs);
 my (@_branch_from, %tree_map, %users);
 my ($_svn_co_url_revs, $_svn_pg_peg_revs);
@@ -54,7 +55,9 @@ my %cmd = (
 	fetch => [ \&fetch, "Download new revisions from SVN",
 			{ 'revision|r=s' => \$_revision, %fc_opts } ],
 	init => [ \&init, "Initialize a repo for tracking" .
-			  " (requires URL argument)", { } ],
+			  " (requires URL argument)",
+			  { 'template=s' => \$_template,
+			    'shared' => \$_shared } ],
 	commit => [ \&commit, "Commit git revisions to SVN",
 			{	'stdin|' => \$_stdin,
 				'edit|e' => \$_edit,
@@ -217,7 +220,10 @@ sub init {
 	$SVN_URL = shift or die "SVN repository location required " .
 				"as a command-line argument\n";
 	unless (-d $GIT_DIR) {
-		sys('git-init-db');
+		my @init_db = ('git-init-db');
+		push @init_db, "--template=$_template" if defined $_template;
+		push @init_db, "--shared" if defined $_shared;
+		sys(@init_db);
 	}
 	setup_git_svn();
 }
-- 
1.4.0
Previous: Eric WongNext: Eric Wong
Message 9 of 14 in “git-svn: better branch support, SVN:: lib usage, feature additions”
  1. 0/13 git-svn: better branch support, SVN:: lib usage, feature additionsEric Wong, Jun 13, 2006
  2. 1/13 git-svn: support -C<num> passing to git-diff-treeEric Wong, Jun 13, 2006
  3. 2/13 git-svn: --branch-all-refs / -B supportEric Wong, Jun 13, 2006
  4. 3/13 git-svn: optimize --branch and --branch-all-refEric Wong, Jun 13, 2006
  5. 4/13 git-svn: support manually placed initial trees from fetchEric Wong, Jun 13, 2006
  6. 5/13 git-svn: Move all git-svn-related paths into $GIT_DIR/svnEric Wong, Jun 13, 2006
  7. 6/13 git-svn: minor cleanups, extra error-checkingEric Wong, Jun 13, 2006
  8. 7/13 git-svn: add --repack and --repack-flags= optionsEric Wong, Jun 13, 2006
  9. 8/13 git-svn: add --shared and --template= options to pass to init-dbEric Wong, Jun 13, 2006
  10. 9/13 git-svn: add some functionality to better support branches in svnEric Wong, Jun 13, 2006
  11. 10/13 git-svn: add UTF-8 message testEric Wong, Jun 13, 2006
  12. 11/13 git-svn: add 'log' command, a facsimile of basic `svn log'Eric Wong, Jun 13, 2006
  13. 12/13 git-svn: add support for Perl SVN::* librariesEric Wong, Jun 13, 2006
  14. 13/13 git-svn: make the $GIT_DIR/svn/*/revs directory obsoleteEric Wong, Jun 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.