From 0f773bd413a5ab023a452c2aa04e234dd8655306 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 21 Feb 2010 02:41:31 +0100 Subject: [PATCH] added changes command for log with diff and stats --- bak-git-server.pl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bak-git-server.pl b/bak-git-server.pl index 64e6008..8343d7a 100755 --- a/bak-git-server.pl +++ b/bak-git-server.pl @@ -15,6 +15,19 @@ You will want to add following to C<~/.ssh/config> RemoteForward 9001 localhost:9001 +bak command overview: + + bak add /path + bak commit [/path [message]] + bak diff + bak status + bak log + + bak ch[anges] + bak revert /path + + bak - push all changed files to server + =cut use warnings; @@ -113,8 +126,9 @@ while (my $client = $server->accept()) { print $client git( 'commit', '-m', $message, ( -e "$hostname/$path" ? "$hostname/$path" : $hostname ) ); - } elsif ( $command =~ m{(diff|status|log)} ) { - $command .= ' --summary' if $command eq 'log'; + } elsif ( $command =~ m{(diff|status|log|ch)} ) { + $command .= ' --stat' if $command eq 'log'; + $command = 'log --patch-with-stat' if $command =~ m/^ch/; pull_changes $hostname if $command eq 'diff'; print $client git($command,$hostname); } elsif ( $command eq 'revert' ) { -- 2.20.1