Skip to content

Commit

Permalink
git-svn: Save init/clone --ignore-paths in config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Jackson authored and Eric Wong committed Apr 12, 2009
1 parent 0d8bee7 commit 88ec205
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions t/t9134-git-svn-ignore-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
'

Expand Down

0 comments on commit 88ec205

Please sign in to comment.