{"thread":{"id":"64410","subject":"[PATCH] svn: fix path strip for branches","startedAt":"2025-10-31T13:26:24Z","lastAt":"2025-11-06T19:29:06Z","messageCount":2,"participants":["Pavel Dydyshko via GitGitGadget","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"530026","messageId":"pull.2087.git.git.1761917181558.gitgitgadget@gmail.com","threadId":"64410","inReplyTo":null,"subject":"[PATCH] svn: fix path strip for branches","fromName":"Pavel Dydyshko via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-10-31T13:26:21Z","receivedAt":"2025-10-31T13:26:24Z","isPatch":true,"sender":{"key":"name:Pavel Dydyshko","avatar":null},"body":"From: Pavel Dydyshka <paul.dydyshko@gmail.com>\n\nWhen checking path against ignore-include regexps $path argument is\ngiven relatively to svn repo root. This results in unwanted prefix which\nis path to svn branch location and should be stripped before testing\npath against ignore-include regexps\n\nSigned-off-by: Pavel Dydyshka <paul.dydyshko@gmail.com>\n---\n    svn: fix path strip for branches\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2087%2Fpddshk%2Fsvn-fix-strip-path-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2087/pddshk/svn-fix-strip-path-v1\nPull-Request: https://github.com/git/git/pull/2087\n\n perl/Git/SVN/Fetcher.pm | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/perl/Git/SVN/Fetcher.pm b/perl/Git/SVN/Fetcher.pm\nindex 968309e6d6..5ac8c71a3d 100644\n--- a/perl/Git/SVN/Fetcher.pm\n+++ b/perl/Git/SVN/Fetcher.pm\n@@ -123,6 +123,10 @@ sub in_dot_git {\n # This will also check whether the path is explicitly included\n sub is_path_ignored {\n \tmy ($self, $path) = @_;\n+\tif ($self->{path_strip}) {\n+\t\t$path =~ s/$self->{path_strip}//;\n+\t\t$path =~ s{^/}{};\n+\t}\n \treturn 1 if in_dot_git($path);\n \treturn 1 if defined($self->{ignore_regex}) &&\n \t            $path =~ m!$self->{ignore_regex}!;\n\nbase-commit: 419c72cb8ada252b260efc38ff91fe201de7c8c3\n-- \ngitgitgadget\n"},{"id":"530337","messageId":"20251106192347.M949304@dcvr","threadId":"64410","inReplyTo":"pull.2087.git.git.1761917181558.gitgitgadget@gmail.com","subject":"Re: [PATCH] svn: fix path strip for branches","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2025-11-06T19:23:47Z","receivedAt":"2025-11-06T19:29:06Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Pavel Dydyshko via GitGitGadget <gitgitgadget@gmail.com> wrote:\n>  perl/Git/SVN/Fetcher.pm | 4 ++++\n>  1 file changed, 4 insertions(+)\n\nCan you please include tests for this and your other change\nfor multi-line support in\n<pull.2091.git.git.1761917197824.gitgitgadget@gmail.com>?\n\nIt's difficult to do any maintainence or updates on `git svn'\nwithout tests, especially since SVN is far less common nowadays\nwith few remaining users.  Thanks.\n"}]}