From: Eric Wong Date: Sun, 25 Jul 2010 08:13:44 GMT Subject: [PATCH 2/1] git svn: remove extraneous newline from log output Message-ID: <20100725081344.GB22373@dcvr.yhbt.net> In-Reply-To: <20100725081057.GA22373@dcvr.yhbt.net> This is to match the output of "svn log", which does not add an extra newline before the next log entry. Signed-off-by: Eric Wong --- The following are pushed to the master git svn repo at git://git.bogomips.org/git-svn Let me know if everything looks alright and I'll ask Junio to pull. Eric Wong (1): git svn: remove extraneous newline from log output Jens Seidel (1): git-svn: tweak log format to match "svn log" output git-svn.perl | 3 +++ t/t9116-git-svn-log.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 5252722..f9b7711 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -5743,6 +5743,9 @@ sub cmd_show_log { push @{$c->{stat}}, $_; $stat = undef; } elsif (/^${esc_color} (git-svn-id:.+)$/o) { + if (@{$c->{l}} && $c->{l}->[-1] eq "\n") { + pop @{$c->{l}}; + } ($c->{url}, $c->{r}, undef) = ::extract_metadata($1); } elsif (s/^${esc_color} //o) { push @{$c->{l}}, $_; diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh index 4394fb2..586f64b 100755 --- a/t/t9116-git-svn-log.sh +++ b/t/t9116-git-svn-log.sh @@ -49,7 +49,7 @@ test_expect_success 'setup repository and import' ' fi ' -test_expect_failure 'log matches svn log' ' +test_expect_success 'log matches svn log' ' git reset --hard a && ( cd checkout && @@ -59,7 +59,7 @@ test_expect_failure 'log matches svn log' ' test_cmp expected actual ' -test_expect_failure NONCLOCALE 'log matches svn log, original locale' ' +test_expect_success NONCLOCALE 'log matches svn log, original locale' ' ( LC_ALL=$ORIGINAL_LANG && ( -- Eric Wong