projects
/
bak-git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1f42f8c
)
multiple commands add,commit on same path
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 25 Jun 2012 14:49:54 +0000
(16:49 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 25 Jun 2012 14:49:59 +0000
(16:49 +0200)
bak-git-server.pl
patch
|
blob
|
history
diff --git
a/bak-git-server.pl
b/bak-git-server.pl
index
58d4dfe
..
d3a69d9
100755
(executable)
--- a/
bak-git-server.pl
+++ b/
bak-git-server.pl
@@
-20,7
+20,7
@@
controll channel (or to pass through server ssh hops using C<ProxyCommand>)
RemoteForward 9001 192.168.42.42:9001
RemoteForward 9001 192.168.42.42:9001
-bak command overview:
+bak command
,
overview:
bak add /path
bak commit [/path [message]]
bak add /path
bak commit [/path [message]]
@@
-37,6
+37,8
@@
bak command overview:
bak - push all changed files to server
bak - push all changed files to server
+ bak add,commit /path
+
See L<http://blog.rot13.org/bak-git> for more information
=cut
See L<http://blog.rot13.org/bak-git> for more information
=cut
@@
-190,6
+192,8
@@
while (my $client = $server->accept()) {
}
my $path = $rel_path =~ m{^/} ? $rel_path : "$pwd/$rel_path";
}
my $path = $rel_path =~ m{^/} ? $rel_path : "$pwd/$rel_path";
+ foreach my $command ( split /,/, $command ) { # XXX command loop
+
warn "$hostname [$command] $on_host:$path | $message\n";
my $args_message = $message;
warn "$hostname [$command] $on_host:$path | $message\n";
my $args_message = $message;
@@
-285,6
+289,8
@@
while (my $client = $server->accept()) {
print $client "ERROR: unknown command: $command\n";
}
print $client "ERROR: unknown command: $command\n";
}
+ } # XXX command, loop
+
close($client);
}
close($client);
}