From b25124237d078bdca081338bf21667365799c583 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 17 Feb 2010 21:50:41 +0100 Subject: [PATCH] add doesn't commit any more This allows multi-file commit, same as in git --- server.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.pl b/server.pl index b158748..22bdea0 100755 --- a/server.pl +++ b/server.pl @@ -25,6 +25,8 @@ while (my $client = $server->accept()) { my ($command,$path,$message) = split(/\s+/,<$client>,3); my $ip = $client->peerhost; + $message ||= ''; + if ( $command eq 'install' ) { print $client '#!/bin/sh',$/,'echo $* | nc 10.60.0.92 9001',$/; next; @@ -48,9 +50,9 @@ while (my $client = $server->accept()) { system 'git', 'add', "$ip/$path"; } else { system 'rsync', "root\@$ip:$path", "$ip/$path"; + $message ||= "$command $ip $path"; + system 'git', 'commit', '-m', $message, "$ip/$path"; } - $message ||= "$command $ip $path"; - system 'git', 'commit', '-m', $message, "$ip/$path"; } -- 2.20.1