chiark / gitweb /
dgit: clean mode: Refactor -wg parsing to prep for suffixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Jan 2019 12:00:08 +0000 (12:00 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Jan 2019 12:43:12 +0000 (12:43 +0000)
This will make it convenient to add new suffix letter(s) to -wg.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 9b107c2..55c8070 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -7298,12 +7298,10 @@ sub parseopts () {
                } elsif (s/^-wn$//s) {
                    push @ropts, $&;
                    $cleanmode = 'none';
-               } elsif (s/^-wg$//s) {
+               } elsif (s/^-wg(f?)$//s) {
                    push @ropts, $&;
                    $cleanmode = 'git';
-               } elsif (s/^-wgf$//s) {
-                   push @ropts, $&;
-                   $cleanmode = 'git-ff';
+                   $cleanmode .= '-ff' if $1;
                } elsif (s/^-wd(d?)([na]?)$//s) {
                    push @ropts, $&;
                    $cleanmode = 'dpkg-source';