This allows you to quickly see if local file (which is not yet tracked
by bak) has changes compared to any remote file.
Have in mind that this will create copy of both files on server, so you
can inspect them later and/or add them to bak if any modifications
are made. This is useful to track intent "I wonder if this file is
changed" directly in bak :-)
$command = 'log --patch-with-stat' if $command =~ m/^ch/;
pull_changes( $hostname ) if $command eq 'diff';
if ( $on_host ) {
+ system 'rsync', '-avv', "root\@$hostname:$path", "$hostname/$path";
system 'rsync', '-avv', "root\@$on_host:$path", "$on_host/$path";
open(my $diff, '-|', "diff -Nuw $hostname$path $on_host$path");
while(<$diff>) {