aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Jackson <ben@ben.com>2009-04-11 10:46:18 -0700
committerEric Wong <normalperson@yhbt.net>2009-04-11 17:55:37 -0700
commit88ec205477e18e612ab854f20ef87aa244b8debe (patch)
tree00a572f0cffbbf8065e8c5fefed99fd16c4c17b9
parent0d8bee71af1cda3d13d896c210773216dcf87b7c (diff)
downloadgit-88ec205477e18e612ab854f20ef87aa244b8debe.tar.gz
git-88ec205477e18e612ab854f20ef87aa244b8debe.tar.xz
git-svn: Save init/clone --ignore-paths in config
The --ignored-paths argument is now stored as "svn-remote.$REMOTE_NAME.ignore-paths" in the config file. [ew: edited subject and message] Signed-off-by: Ben Jackson <ben@ben.com> Acked-by: Eric Wong <normalperson@yhbt.net>
-rw-r--r--Documentation/git-svn.txt4
-rwxr-xr-xgit-svn.perl3
-rwxr-xr-xt/t9134-git-svn-ignore-paths.sh4
3 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index aad5e65c7..9229d45ad 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -85,6 +85,10 @@ COMMANDS
specified, the prefix must include a trailing slash.
Setting a prefix is useful if you wish to track multiple
projects that share a common repository.
+--ignore-paths=<regex>;;
+ When passed to 'init' or 'clone' this regular expression will
+ be preserved as a config key. See 'fetch' for a description
+ of '--ignore-paths'.
'fetch'::
Fetch unfetched revisions from the Subversion remote we are
diff --git a/git-svn.perl b/git-svn.perl
index 279847921..bc3ba064e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -336,6 +336,9 @@ sub do_git_init_db {
command_noisy('config', "$pfx.$i", $icv{$i});
$set = $i;
}
+ my $ignore_regex = \$SVN::Git::Fetcher::_ignore_regex;
+ command_noisy('config', "$pfx.ignore-paths", $$ignore_regex)
+ if defined $$ignore_regex;
}
sub init_subdir {
diff --git a/t/t9134-git-svn-ignore-paths.sh b/t/t9134-git-svn-ignore-paths.sh
index b9a15978e..71fdc4a69 100755
--- a/t/t9134-git-svn-ignore-paths.sh
+++ b/t/t9134-git-svn-ignore-paths.sh
@@ -40,10 +40,10 @@ test_expect_success 'init+fetch an SVN repository with ignored www directory' '
test_cmp expect expect2
'
-test_expect_success 'set persistent ignore-paths config' '
+test_expect_success 'verify ignore-paths config saved by clone' '
(
cd g &&
- git config svn-remote.svn.ignore-paths "^www"
+ git config --get svn-remote.svn.ignore-paths | fgrep "www"
)
'