diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-01-06 11:15:13 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-01-06 12:43:12 +0000 |
commit | 70b522e712e52444e8c7b924502380d6413040fa (patch) | |
tree | 68646f7ff89944f88eb88c82958edd95a77ba8da | |
parent | e0c2627975ac581b23826ec9a3e766df5dfea46c (diff) |
dgit: clean: Change matcbing of git to regexps
We are going to have some ,... suffixes on this, so we need more
general matching.
No functional change with the current set of clean modes.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | dgit | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6269,9 +6269,9 @@ sub clean_tree () { runcmd_ordryrun_local @cmd; clean_tree_check_git_wd __ "tree contains uncommitted files (after running rules clean)"; - } elsif ($cleanmode eq 'git') { + } elsif ($cleanmode =~ m{^git(?!-)}) { runcmd_ordryrun_local @git, qw(clean -xdf); - } elsif ($cleanmode eq 'git-ff') { + } elsif ($cleanmode =~ m{^git-ff}) { runcmd_ordryrun_local @git, qw(clean -xdff); } elsif ($cleanmode =~ m{^check}) { clean_tree_check(); |