fix commit
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 21 Feb 2010 03:32:17 +0000 (04:32 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 21 Feb 2010 03:32:17 +0000 (04:32 +0100)
bak-git-server.pl

index 8343d7a..aea05fe 100755 (executable)
@@ -123,7 +123,8 @@ while (my $client = $server->accept()) {
                print $client git 'add', "$hostname/$path";
        } elsif ( $command eq 'commit' ) {
                pull_changes $hostname;
-               print $client git( 'commit', '-m', $message,
+               $message =~ s/'/\\'/g;
+               print $client git( "commit -m '$message' ",
                        ( -e "$hostname/$path" ? "$hostname/$path" : $hostname )
                );
        } elsif ( $command =~ m{(diff|status|log|ch)} ) {