svn: fix path strip for branches
PATCH 1/1 svn: fix path strip for branches
From: Pavel Dydyshka <[email protected]>
When checking path against ignore-include regexps $path argument is given relatively to svn repo root. This results in unwanted prefix which is path to svn branch location and should be stripped before testing path against ignore-include regexps
---
svn: fix path strip for branches
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2087%2Fpddshk%2Fsvn-fix-strip-path-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2087/pddshk/svn-fix-strip-path-v1
Pull-Request: https://github.com/git/git/pull/2087
perl/Git/SVN/Fetcher.pm | 4 ++++ 1 file changed, 4 insertions(+)
perl/Git/SVN/Fetcher.pm +4 -0
@@ -123,6 +123,10 @@ sub in_dot_git { # This will also check whether the path is explicitly included sub is_path_ignored { my ($self, $path) = @_; + if ($self->{path_strip}) { + $path =~ s/$self->{path_strip}//; + $path =~ s{^/}{}; + } return 1 if in_dot_git($path); return 1 if defined($self->{ignore_regex}) && $path =~ m!$self->{ignore_regex}!;
base-commit: 419c72cb8ada252b260efc38ff91fe201de7c8c3
Signature · 1 line
gitgitgadget
Quoted 2 lines · Pavel Dydyshko via GitGitGadget
perl/Git/SVN/Fetcher.pm | 4 ++++ 1 file changed, 4 insertions(+)
Can you please include tests for this and your other change for multi-line support in <[email protected]>?
It's difficult to do any maintainence or updates on `git svn' without tests, especially since SVN is far less common nowadays with few remaining users. Thanks.