From: Dobrica Pavlinusic Date: Wed, 17 Feb 2010 23:12:08 +0000 (+0100) Subject: added --summary to log output, fix commit rsync X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=bbbbbf56460cd517bade41c21e4780fe05149882;p=bak-git.git added --summary to log output, fix commit rsync --- diff --git a/server.pl b/server.pl index b6194e2..a481086 100755 --- a/server.pl +++ b/server.pl @@ -84,11 +84,12 @@ while (my $client = $server->accept()) { system 'rsync', '-avv', "root\@$ip:$path", "$ip/$path"; system 'git', 'add', "$ip/$path"; } elsif ( $command eq 'commit' ) { - system 'rsync', '-avv', "root\@$ip:$path", "$ip/$path"; + system 'rsync', '-avv', "root\@$ip:$path", "$ip/$path" if $path; $message ||= "$command $ip $path"; system 'git', 'commit', '-m', $message, "$ip/$path"; } elsif ( $command =~ m{(diff|status|log)} ) { - print $client `git $command $ip`; + my $opt = '--summary' if $command eq 'log'; + print $client `git $command $opt $ip`; } else { print $client "Unknown command: $command\n"; }