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:
e8eb03d
)
added changes command for log with diff and stats
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 21 Feb 2010 01:41:31 +0000
(
02:41
+0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 21 Feb 2010 01:41:31 +0000
(
02:41
+0100)
bak-git-server.pl
patch
|
blob
|
history
diff --git
a/bak-git-server.pl
b/bak-git-server.pl
index
64e6008
..
8343d7a
100755
(executable)
--- 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
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;
=cut
use warnings;
@@
-113,8
+126,9
@@
while (my $client = $server->accept()) {
print $client git( 'commit', '-m', $message,
( -e "$hostname/$path" ? "$hostname/$path" : $hostname )
);
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' ) {
pull_changes $hostname if $command eq 'diff';
print $client git($command,$hostname);
} elsif ( $command eq 'revert' ) {