From: Ian Jackson Date: Sat, 13 Oct 2018 11:33:12 +0000 (+0100) Subject: dgit: Combine option parsing of -wd and -wdd X-Git-Tag: archive/debian/8.0~20 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=c4f072101fba40bf5d387dbdd98d1459df82c67d dgit: Combine option parsing of -wd and -wdd We are going to introduce more variants, so we need to refactor this. No functionalk change. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index de697a15..57e1e40d 100755 --- a/dgit +++ b/dgit @@ -7262,12 +7262,10 @@ sub parseopts () { } elsif (s/^-wgf$//s) { push @ropts, $&; $cleanmode = 'git-ff'; - } elsif (s/^-wd$//s) { + } elsif (s/^-wd(d?)$//s) { push @ropts, $&; $cleanmode = 'dpkg-source'; - } elsif (s/^-wdd$//s) { - push @ropts, $&; - $cleanmode = 'dpkg-source-d'; + $cleanmode .= '-d' if $1; } elsif (s/^-wc$//s) { push @ropts, $&; $cleanmode = 'check';