hostname must end with / to prevent error from git:
ambiguous argument 'arh-hw': both revision and filename
to support branches named as hosts
+ commit --author support
+ diff/revert from another host:/paths/
-- bak diff without params doesn't return full host diff
++ bak diff without params doesn't return full host diff
- bak ls
- daily cron job to create branch with uncommited changes
- bak cat host:/path/to/file
}
} else {
# commands without path will show host-wide status/changes
- print $client git($command, $rel_path ? $backup_path : $hostname);
+ my $backup_path = $rel_path ? $backup_path : "$hostname/";
+ # hostname must end with / to prevent error from git:
+ # ambiguous argument 'arh-hw': both revision and filename
+ # to support branches named as hosts
+ print $client git($command, $backup_path);
}
} elsif ( $command eq 'revert' ) {
if ( $on_host ) {