From: Ian Jackson Date: Sat, 10 Aug 2019 18:22:24 +0000 (+0100) Subject: dgit: vcs-git handling: Strip [...] a la Haskell Team X-Git-Tag: archive/debian/9.7~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7b8ab167436587a706db5096e8a8f49e6f4a8ab3;p=dgit.git 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 --- 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; }