diff options
Diffstat (limited to 'scripts/vyatta-config-mgmt.pl')
-rwxr-xr-x | scripts/vyatta-config-mgmt.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl index 5bd1b03..58f517c 100755 --- a/scripts/vyatta-config-mgmt.pl +++ b/scripts/vyatta-config-mgmt.pl @@ -310,8 +310,13 @@ if ($action eq 'diff') { my $filename = cm_commit_get_file_name($rev1); my $filename2 = cm_commit_get_file_name($rev2); my $diff = `zdiff -u $filename2 $filename`; - $diff = filter_file_lines($diff); - print "$diff\n"; + if (defined $diff and length($diff) > 0) { + $diff = filter_file_lines($diff); + print "$diff\n"; + } else { + print "No changes between revision $rev1 and " + . "revision $rev2 configurations\n"; + } } exit 0; } |