summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2013-12-11 20:26:08 +0100
committerJean Delvare <jdelvare@suse.de>2013-12-11 20:26:08 +0100
commitc49d0e6075ee8f3d08985039e601851b1bdac26c (patch)
tree600785d82a8bb3ab05355c73df9d346a21b20e49 /bin
parent5217641b8998a6fef1742814545c07014dea2e35 (diff)
downloadquilt-c49d0e6075ee8f3d08985039e601851b1bdac26c.tar.gz
guards: Add option --with-guards
guards -w prints the guards in the output stream.
Diffstat (limited to 'bin')
-rw-r--r--bin/guards.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/guards.in b/bin/guards.in
index 9a5721b..2c175fa 100644
--- a/bin/guards.in
+++ b/bin/guards.in
@@ -89,8 +89,8 @@ sub parse($$) {
# Command line options
#
-my ($dir, $config, $default, $check, $list, $invert_match) =
- ( '', '-', 1, 0, 0, 0);
+my ($dir, $config, $default, $check, $list, $invert_match, $with_guards) =
+ ( '', '-', 1, 0, 0, 0, 0);
my @path;
# Help text
@@ -114,6 +114,7 @@ eval {
'c|config=s' => \$config,
'C|check' => \$check,
'l|list' => \$list,
+ 'w|with-guards' => \$with_guards,
'p|path=s' => \@path,
'D|default=i' => \$default,
'v|invert-match' => \$invert_match,
@@ -178,6 +179,8 @@ if ($check) {
} elsif ($list) {
parse($fh, sub {
my ($patch, @guards) = @_;
+ print join(' ', @guards), ' '
+ if (@guards && $with_guards);
print "$dir$patch\n";
});
} else {