projects
/
bak-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2b26bb1
)
added --summary to log output, fix commit rsync
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 17 Feb 2010 23:12:08 +0000
(
00:12
+0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 17 Feb 2010 23:12:08 +0000
(
00:12
+0100)
server.pl
patch
|
blob
|
history
diff --git
a/server.pl
b/server.pl
index
b6194e2
..
a481086
100755
(executable)
--- 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 '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)} ) {
$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";
}
} else {
print $client "Unknown command: $command\n";
}