From 9fa3df2d9838f2aecb0d0cb6d1a565d824828d65 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 13 Nov 2014 16:05:15 +0000 Subject: [PATCH] cs-adjust-flight: runvar-perlop: Do not report non-changes With -v, runvar-perlop would unconditionally print a message about the changed variable. Instead, only call runvar_set if the value is to change. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- cs-adjust-flight | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cs-adjust-flight b/cs-adjust-flight index 7ec17e3..d6cab1a 100755 --- a/cs-adjust-flight +++ b/cs-adjust-flight @@ -268,7 +268,8 @@ sub change__runvar_perlop { my ($job, $name, $varrow) = @_; my $oldval = $varrow->{val}; my $newval = perlop_value($job, $name, $op, $oldval); - runvar_set($job, $name, $newval, " (modified from \`$oldval')"); + runvar_set($job, $name, $newval, " (modified from \`$oldval')") + if $newval ne $oldval; }, 'IGNORE'); } -- 2.39.5