summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-02-15 08:40:42 (GMT)
committerEric Wong <normalperson@yhbt.net>2007-02-23 08:57:13 (GMT)
commit488a63ec233ce7edc5fd70172c196628b1d6a82b (patch)
tree9032c4cd8d406b32b0a7d0032898e2e925e38760 /git-svn.perl
parenta836a0e1729d1758b4085cd07fc79cb9acb64908 (diff)
downloadgit-488a63ec233ce7edc5fd70172c196628b1d6a82b.zip
git-488a63ec233ce7edc5fd70172c196628b1d6a82b.tar.gz
git-488a63ec233ce7edc5fd70172c196628b1d6a82b.tar.bz2
git-svn: add support for --stat in the log command
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl11
1 files changed, 9 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 31e536c..2152bf3 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3234,7 +3234,7 @@ sub show_commit_normal {
print "\n";
}
- foreach my $x (qw/raw diff/) {
+ foreach my $x (qw/raw stat diff/) {
if ($c->{$x}) {
print "\n";
print $_ foreach @{$c->{$x}}
@@ -3266,7 +3266,7 @@ sub cmd_show_log {
@args = (git_svn_log_cmd($r_min, $r_max, @args), @args);
my $log = command_output_pipe(@args);
run_pager();
- my (@k, $c, $d);
+ my (@k, $c, $d, $stat);
my $esc_color = qr/(?:\033\[(?:(?:\d+;)*\d*)?m)*/;
while (<$log>) {
if (/^${esc_color}commit ($::sha1_short)/o) {
@@ -3294,6 +3294,13 @@ sub cmd_show_log {
push @{$c->{diff}}, $_;
} elsif ($d) {
push @{$c->{diff}}, $_;
+ } elsif (/^\ .+\ \|\s*\d+\ $esc_color[\+\-]*
+ $esc_color*[\+\-]*$esc_color$/x) {
+ $stat = 1;
+ push @{$c->{stat}}, $_;
+ } elsif ($stat && /^ \d+ files changed, \d+ insertions/) {
+ push @{$c->{stat}}, $_;
+ $stat = undef;
} elsif (/^${esc_color} (git-svn-id:.+)$/o) {
($c->{url}, $c->{r}, undef) = ::extract_metadata($1);
} elsif (s/^${esc_color} //o) {