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>
Ben Jackson committed
Apr 11, 2009 at 10:46 UTC
88ec205477e18e612ab854f20ef87aa244b8debe
3 files changed
+9
-2
Documentation/git-svn.txt
+4
@@ -85,6 +85,10 @@ COMMANDS
85
specified, the prefix must include a trailing slash.
86
Setting a prefix is useful if you wish to track multiple
87
projects that share a common repository.
88
+--ignore-paths=<regex>;;
89
+ When passed to 'init' or 'clone' this regular expression will
90
+ be preserved as a config key. See 'fetch' for a description
91
+ of '--ignore-paths'.
92
93
'fetch'::
94
Fetch unfetched revisions from the Subversion remote we are
git-svn.perl
+3
@@ -336,6 +336,9 @@ sub do_git_init_db {
336
command_noisy('config', "$pfx.$i", $icv{$i});
337
$set = $i;
338
}
339
+ my $ignore_regex = \$SVN::Git::Fetcher::_ignore_regex;
340
+ command_noisy('config', "$pfx.ignore-paths", $$ignore_regex)
341
+ if defined $$ignore_regex;
342
}
343
344
sub init_subdir {
t/t9134-git-svn-ignore-paths.sh
+2
-2
@@ -40,10 +40,10 @@ test_expect_success 'init+fetch an SVN repository with ignored www directory' '
40
test_cmp expect expect2
41
'
42
43
-test_expect_success 'set persistent ignore-paths config' '
43
+test_expect_success 'verify ignore-paths config saved by clone' '
44
(
45
cd g &&
46
- git config svn-remote.svn.ignore-paths "^www"
46
+ git config --get svn-remote.svn.ignore-paths | fgrep "www"
47
)
48
'
49