From 7b8ab167436587a706db5096e8a8f49e6f4a8ab3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 10 Aug 2019 19:22:24 +0100 Subject: [PATCH] dgit: vcs-git handling: Strip [...] a la Haskell Team The final syntax of this is not yet agreed but this regexp ought to do the right thing in all reasonable cases. (Ie, no [ ] inside the [ ].) See also #932696 against policy, which is discussing the spec. Closes: #932699 Signed-off-by: Ian Jackson --- dgit | 1 + 1 file changed, 1 insertion(+) diff --git a/dgit b/dgit index 541e8f60..941a14b9 100755 --- a/dgit +++ b/dgit @@ -3853,6 +3853,7 @@ sub vcs_git_url_of_ctrl ($) { my $vcsgiturl = $ctrl->{'Vcs-Git'}; if (length $vcsgiturl) { $vcsgiturl =~ s/\s+-b\s+\S+//g; + $vcsgiturl =~ s/\s+\[[^][]*\]//g; } return $vcsgiturl; } -- 2.30.2