This allows diffing files which are not added on source or destination
host
$command = 'log --patch-with-stat' if $command =~ m/^ch/;
pull_changes( $hostname ) if $command eq 'diff';
if ( $on_host ) {
- mkpath "$hostname/$dir" unless -e "$hostname/$dir";
+ mkpath $_ foreach grep { ! -e $_ } ( "$hostname/$dir", "$on_host/$dir" );
rsync( '-avv', "root\@$hostname:$path", "$hostname/$path" );
rsync( '-avv', "root\@$on_host:$path", "$on_host/$path" );
open(my $diff, '-|', "diff -Nuw $hostname$path $on_host$path");