Commits

Anonymous committed 88ec205

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>

Comments (0)

Files changed (3)

Documentation/git-svn.txt

 	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
 		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 {

t/t9134-git-svn-ignore-paths.sh

 	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"
 	)
 '