git svn: don't introduce new paragraph for git-svn-id
While importing changes from SVN by git svn fetch' strip any white spaces from beginnings and endings of SVN commit messages and skip adding a new line character before git-svn-id:' line in case the commit message ends with another pseudo-header (like From:, Signed-off-by: or Change-Id:, etc.).
This patch allows one to use gerrit code review system on git-svn-managed repositories. gerrit expects its Change-Id:' header to appear in the last paragraph of commit message and git-svn-id:' following a new line character was breaking this expectation.
--- perl/Git/SVN.pm | 5 +- t/t9122-git-svn-author.sh | 4 +- t/t9163-git-svn-import-messages.sh | 174 ++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+), 3 deletions(-) create mode 100755 t/t9163-git-svn-import-messages.sh
perl/Git/SVN.pm +4 -1
@@ -1015,7 +1015,8 @@ sub do_git_commit { print $msg_fh $log_entry->{log} or croak $!; restore_commit_header_env($old_env); unless ($self->no_metadata) { - print $msg_fh "\ngit-svn-id: $log_entry->{metadata}\n" + print $msg_fh "\n" unless $log_entry->{log} =~ m/\n\n([\w-]+:\s.*\n)+$/; + print $msg_fh "git-svn-id: $log_entry->{metadata}\n" or croak $!; } $msg_fh->flush == 0 or croak $!;
@@ -1803,6 +1804,8 @@ sub make_log_entry { close $un or croak $!; $log_entry{date} = parse_svn_date($log_entry{date}); + $log_entry{log} =~ s/^\s*//; + $log_entry{log} =~ s/\s*$//; $log_entry{log} .= "\n"; my $author = $log_entry{author} = check_author($log_entry{author}); my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
t/t9122-git-svn-author.sh +2 -2
@@ -68,8 +68,8 @@ test_expect_success 'interact with it via git svn' ' # Make sure there are no commit messages with excess blank lines test $(grep "^ " actual.2 | wc -l) = 3 && - test $(grep "^ " actual.3 | wc -l) = 5 && - test $(grep "^ " actual.4 | wc -l) = 5 && + test $(grep "^ " actual.3 | wc -l) = 4 && + test $(grep "^ " actual.4 | wc -l) = 4 && # Make sure there are no svn commit messages with excess blank lines (
t/t9163-git-svn-import-messages.sh new file +174 -0
174 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Quoted 10 lines · Robert Luberda
While importing changes from SVN by
git svn fetch' strip any white spaces from beginnings and endings of SVN commit messages and skip adding a new line character beforegit-svn-id:' line in case the commit message ends with another pseudo-header (like From:, Signed-off-by: or Change-Id:, etc.).This patch allows one to use gerrit code review system on git-svn-managed repositories. gerrit expects its
Change-Id:' header to appear in the last paragraph of commit message andgit-svn-id:' following a new line character was breaking this expectation.
I've long wanted to change this, but it breaks compatibility if folks are importing from the same repo, sharing changes and one upgrades git-svn.
How about making this optional and configurable at init/clone time?
Eric Wong wrote:
Hi,
Quoted 4 lines
I've long wanted to change this, but it breaks compatibility if folks are importing from the same repo, sharing changes and one upgrades git-svn.
Yes, I'm aware of this. That's why in our team at work everybody is forced to use the modified version of git-svn:)
[ A bit of background: we have recently started using git svn at after our main repository had been migrated to svn. Previously git over clearcase approach was used; we established some workflow and a part of it was to use gerrit for code reviews, however it turned out to be hardly possible with git svn. On the other hand the lack of error handling was pretty annoying when changes get rejected by svn pre-commit hook. That's why I wrote the two patches I sent today. ]
Quoted 1 line
How about making this optional and configurable at init/clone time?
I don't think it will be hard to make it configurable. I can try to make such a change, do you have any preferences about the option and configuration key names?
Thanks a lot,
robert
Quoted 6 lines · Robert Luberda
Quoted 1 line · Eric Wong
How about making this optional and configurable at init/clone time?
I don't think it will be hard to make it configurable. I can try to make such a change, do you have any preferences about the option and configuration key names?
No preference off the top of my head. As long as it makes sense to enough people here and is consistent in style with existing options in git.
Thanks.
Eric Wong wrote:
Hi,
Quoted 7 lines
Quoted 3 lines
I don't think it will be hard to make it configurable. I can try to make such a change, do you have any preferences about the option and configuration key names?
No preference off the top of my head. As long as it makes sense to enough people here and is consistent in style with existing options in git.
I have been quite a busy recently, so it took me longer that I thought.
It was quite hard for me to think some sensible option name, and finally have chosen --trim-svn-log (svn.trimsvnlog as config key name). Please let me know if such name is ok for you. If not, I'll try to find a different one (but as I wrote I'm not really good at giving names to options/functions/variables, etc. :()
I considered making the option a default one for new git svn clones, so that existing repositories would use the older approach, but I gave up the idea, and implemented the simpler solution, in which the option must be given explicitly if one needs the new behavior. If making it a default for new clones would make sense for you, I can try to implement this as well.
For consistency, the `--add-author-from' option was modified not to add an extra new line before 'From: ' line when the newly introduced option is in effect.
I'm sending a new patch in next e-mail, could you please look at it and share any comments you might have? One thing I was not sure about is the requirement, introduced in the change, of having a whitespace character after a colon in pseudo-header lines
(e.g. `From:somebody <[email protected]>' won't be considered as a pseudo-header) - is this consistent with a way git handles headers/pseudo-headers?
Best regards,
robert
[PATCH/RFC] git svn: optionally trim imported log messages
Introduce a `--trim-svn-log' option and svn.trimsvnlog boolean configuration key for git svn commands.
When enabled while retrieving commits from svn, git svn will strip any white spaces from beginnings and endings of SVN commit messages and will skip adding an extra new line character before git-svn-id:' line in case the commit message already ends with a pseudo-headers section (a section starting with an empty line followed by one or more pseudo-headers like From: ', Signed-off-by: ', or Change-Id: ').
Additionally, while creating new commits in svn when the new option is enabled and --add-author-from' is in effect, git svn will not add a new line character before the From: ' pseudo-header if the commit message already ends with a pseudo-headers section.
The new option allows one to use gerrit code review system on git-svn-managed repositories. gerrit expects its Change-Id:' header to appear in the last paragraph of commit message and the standard behaviour of preceding git-svn-id:' line with a new line character was breaking this expectation.
--- Documentation/git-svn.txt | 16 ++ git-svn.perl | 8 +- perl/Git/SVN.pm | 19 +- t/t9165-git-svn-import-messages.sh | 387 ++++++++++++++++++++++++++++++++++++ 4 files changed, 427 insertions(+), 3 deletions(-) create mode 100755 t/t9165-git-svn-import-messages.sh
Documentation/git-svn.txt +16 -0
@@ -603,6 +603,22 @@ creating the branch or tag. git commit's author string. If you use this, then `--use-log-author` will retrieve a valid author string for all commits. +--trim-svn-log:: + When retrieving svn commits into git (as part of 'fetch', 'rebase', + or 'dcommit') trim the whitespaces from beginnings and endings + of the svn log messages and avoid preceding `git-svn-id:` line with + a new line character in case the log message already ends with a + pseudo-headers section (i.e. section starting with an empty line + followed by one or more lines like `Signed-off-by: `, `From: `, + or `Change-Id: `). ++ +When committing to svn from git (as part of 'commit-diff', 'set-tree' +or 'dcommit') and '--add-author-from' is in effect, a new line character +is not added before the `From: ` line if the log message ends with +a pseudo-headers section. ++ +[verse] +config key: svn.trimsvnlog ADVANCED OPTIONS ----------------
git-svn.perl +7 -1
@@ -133,6 +133,7 @@ my %fc_opts = ( 'follow-parent|follow!' => \$Git::SVN::_follow_parent, \$Git::SVN::_repack_flags, 'use-log-author' => \$Git::SVN::_use_log_author, 'add-author-from' => \$Git::SVN::_add_author_from, + 'trim-svn-log' => \$Git::SVN::_trim_svn_log, 'localtime' => \$Git::SVN::_localtime, %remote_opts );
@@ -500,6 +501,8 @@ sub cmd_clone { cmd_init($url, $path); command_oneline('config', 'svn.authorsfile', $authors_absolute) if $_authors; + command_oneline('config', 'svn.trimsvnlog', 'true') + if $Git::SVN::_trim_svn_log; Git::SVN::fetch_all($Git::SVN::default_repo_id); }
@@ -1782,7 +1785,10 @@ sub get_commit_entry { $msgbuf =~ s/\s+$//s; if ($Git::SVN::_add_author_from && defined($author) && !$saw_from) { - $msgbuf .= "\n\nFrom: $author"; + $msgbuf .= "\n"; + $msgbuf .= "\n" + unless Git::SVN::avoid_extra_new_line($msgbuf); + $msgbuf .= "From: $author"; } print $log_fh $msgbuf or croak $!; command_close_pipe($msg_fh, $ctx);
perl/Git/SVN.pm +17 -2
@@ -5,7 +5,7 @@ use Fcntl qw/:DEFAULT :seek/; use constant rev_map_fmt => 'NH40'; use vars qw/$_no_metadata $_repack $_repack_flags $_use_svm_props $_head - $_use_svnsync_props $no_reuse_existing + $_use_svnsync_props $no_reuse_existing $_trim_svn_log $_use_log_author $_add_author_from $_localtime/; use Carp qw/croak/; use File::Path qw/mkpath/;
@@ -978,6 +978,17 @@ sub gc { command_noisy('gc', '--auto'); }; +# An utility function which returns true if both trimming svn log messages +# is enabled, and passed log entry ends with a pseudo-headers section (i.e. +# section starting with empty line followed by one or more pseudo-headers +# like 'From: ' or 'Change-Id: ' etc.) +sub avoid_extra_new_line { + return 0 unless $_trim_svn_log; + + my $log_entry = shift; + return ($log_entry =~ m/\n\n([\w-]+:\s.*\n)+$/); +} + sub do_git_commit { my ($self, $log_entry) = @_; my $lr = $self->last_rev;
@@ -1015,7 +1026,9 @@ sub do_git_commit { print $msg_fh $log_entry->{log} or croak $!; restore_commit_header_env($old_env); unless ($self->no_metadata) { - print $msg_fh "\ngit-svn-id: $log_entry->{metadata}\n" + print $msg_fh "\n" + unless avoid_extra_new_line($log_entry->{log}); + print $msg_fh "git-svn-id: $log_entry->{metadata}\n" or croak $!; } $msg_fh->flush == 0 or croak $!;
@@ -1821,6 +1834,8 @@ sub make_log_entry { close $un or croak $!; $log_entry{date} = parse_svn_date($log_entry{date}); + $log_entry{log} =~ s/^\s*// if $_trim_svn_log; + $log_entry{log} =~ s/\s*$// if $_trim_svn_log; $log_entry{log} .= "\n"; my $author = $log_entry{author} = check_author($log_entry{author}); my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
t/t9165-git-svn-import-messages.sh new file +387 -0
387 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Re: [PATCH/RFC] git svn: optionally trim imported log messages
Quoted 15 lines · Robert Luberda
Introduce a `--trim-svn-log' option and svn.trimsvnlog boolean configuration key for git svn commands.
When enabled while retrieving commits from svn, git svn will strip any white spaces from beginnings and endings of SVN commit messages and will skip adding an extra new line character before
git-svn-id:' line in case the commit message already ends with a pseudo-headers section (a section starting with an empty line followed by one or more pseudo-headers likeFrom: ',Signed-off-by: ', orChange-Id: ').Additionally, while creating new commits in svn when the new option is enabled and
--add-author-from' is in effect, git svn will not add a new line character before theFrom: ' pseudo-header if the commit message already ends with a pseudo-headers section.
Quoted 6 lines
The new option allows one to use gerrit code review system on git-svn-managed repositories. gerrit expects its
Change-Id:' header to appear in the last paragraph of commit message and the standard behaviour of precedinggit-svn-id:' line with a new line character was breaking this expectation.
---
Sign-off?
Quoted 18 lines
Documentation/git-svn.txt | 16 ++ git-svn.perl | 8 +- perl/Git/SVN.pm | 19 +- t/t9165-git-svn-import-messages.sh | 387 ++++++++++++++++++++++++++++++++++++ 4 files changed, 427 insertions(+), 3 deletions(-) create mode 100755 t/t9165-git-svn-import-messages.shDocumentation/git-svn.txt +3
-0@@ -603,6 +603,22 @@ creating the branch or tag. git commit's author string. If you use this, then `--use-log-author` will retrieve a valid author string for all commits. +--trim-svn-log:: + When retrieving svn commits into git (as part of 'fetch', 'rebase', + or 'dcommit') trim the whitespaces from beginnings and endings
Documentation/git-svn.txt creating the branch or tag. · line 618
Quoted 10 lines
Documentation/git-svn.txt +10
-0+ of the svn log messages and avoid preceding `git-svn-id:` line with + a new line character in case the log message already ends with a + pseudo-headers section (i.e. section starting with an empty line + followed by one or more lines like `Signed-off-by: `, `From: `, + or `Change-Id: `). ++ +When committing to svn from git (as part of 'commit-diff', 'set-tree' +or 'dcommit') and '--add-author-from' is in effect, a new line character +is not added before the `From: ` line if the log message ends with +a pseudo-headers section.
I think it would be saner to call them "trailers" to avoid confusion.
I've seen S-o-b, Cc and Change-Id there, but does anybody actually put "From: " there?
There needs an explanation to the reader why this is an optional feature.
Quoted 19 lines
t/t9165-git-svn-import-messages.sh new file +16
-0@@ -0,0 +1,387 @@ +#!/bin/sh +# +# Copyright (c) 2012 Robert Luberda +# + +test_description='checks behaviour of --trim-svn-log option of git svn' +. ./lib-git-svn.sh + +# The test cases in this file check if the --trim-svn-log option +# of git svn works as expected. +# +# Basically the test cases use two git repositories: +# * work-TRIM.git, created by git svn clone with the option enabled, +# * work-NOTR.git, created with the option disabled. +# +# Each test case (except for the first two) does the following:
t/t9165-git-svn-import-messages.sh line 26
Quoted 10 lines
t/t9165-git-svn-import-messages.sh new file +10
-0+# 1. commit a change to svn with either svn commit, or git svn dcommit +# (what is important is the commit log message, not the changed file) +# 2. git svn rebase the work-NOTR.git repository and check its most recent +# log message against some expected output +# 3. git svn rebase the work-TRIM.git repository and similarly check the +# latest log message +# +# The following two prerequisites are defined mostly for debugging purposes +# to make it possible to skip test cases or parts of the test cases that +# operate on one of the two git repositories. For example to ignore checking
The prerequisite mechanism is to allow some tests in an environment where they cannot be run (e.g. no SVN available on the platform); any code that uses set_prereq unconditionally looks extremely strange. It is OK while the patch is in RFC stage under active debugging, but they would want to go away before the polishing is done.
Quoted 4 lines
t/t9165-git-svn-import-messages.sh new file +4
-0+# of log messages imported when --trim-svn-log is enabled, one needs to comment +# out the PRQ_TRIM pre-requisite (this makes it possible to run the test with +# a version of git svn that does not support the option yet). Similarly +# commenting out the PRQ_NOTR pre-requisite will check only the effects of the
t/t9165-git-svn-import-messages.sh line 40
Quoted 10 lines
t/t9165-git-svn-import-messages.sh new file +9
-0+# svn log trimming option. +# Please note that a whole test case must be marked as requiring one of +# those pre-requisites if and only if it uses `git svn dcommit' for committing +# changes to svn. +test_set_prereq PRQ_TRIM +test_set_prereq PRQ_NOTR +N=0 +NL="" # for better readability only, e.g.: + # "$NL" " " "$NL" is cleaner than "" " " ""
What does En-El stand for? We often see (but not in Git where we prefer LF for that purpose)
NL='
' ;# newlineand using $NL to mean "empty" may be misleading to the readers.
t/t9165-git-svn-import-messages.sh line 46
Quoted 5 lines
t/t9165-git-svn-import-messages.sh new file +5
-0+next_N() +{ + N=$((N + 1)) && + echo "N is $N" +}
Most shells tolerate writing a bare N inside arith substitution, but for better portability, please spell this as
next_N () {
N=$(($N + 1)) &&
...
}(the above also has two style fixes).
t/t9165-git-svn-import-messages.sh line 54
Quoted 8 lines
t/t9165-git-svn-import-messages.sh new file +8
-0+ +# An utility function used for writing log messages to files +get_file_contents() +{ + for line in "$@"; do + echo "$line" + done +}
(Style)
get_file_contents () {
for line
do
...
done
}Re: [PATCH/RFC] git svn: optionally trim imported log messages
Junio C Hamano writes:
Hi,
Junio, for some reason I don't get mails from you, I've just discovered your e-mails on gmane news list. Anyway many thanks for your comments, I'll fix them and send updated patch next week.
Quoted 7 lines
Documentation/git-svn.txt creating the branch or tag. · line 618
Quoted 4 lines
Documentation/git-svn.txt +4
-0+When committing to svn from git (as part of 'commit-diff', 'set-tree' +or 'dcommit') and '--add-author-from' is in effect, a new line character +is not added before the `From: ` line if the log message ends with +a pseudo-headers section.I think it would be saner to call them "trailers" to avoid confusion.
Thanks, I haven't got any idea how to call them, especially because existing git documentation refers to them just by using the word `line', e.g.:
git-am.txt: Add a Signed-off-by: line to the commit message,
git-cherry-pick.txt: Add Signed-off-by line at the end of the
(The "trailer" keyword appears once in SubmittingPatches and - in a bit different meaning in technical/pack-format.txt)
Quoted 3 lines
I've seen S-o-b, Cc and Change-Id there, but does anybody actually put "From: " there?
Yes, `git svn dcommit --add-author-from' adds such a trailer to the svn log message, and then resets or rebases the git index against svn, so that the message with the trailer appears in git.
Quoted 3 lines
There needs an explanation to the reader why this is an optional feature.
OK, I'll add some explanation. Basically it is optional, per Eric request, for backward compatibility to make it possible to work on a centralized clone of svn repository by people using both old and new versions of git svn.
Quoted 7 lines
The prerequisite mechanism is to allow some tests in an environment where they cannot be run (e.g. no SVN available on the platform); any code that uses
set_prerequnconditionally looks extremely strange. It is OK while the patch is in RFC stage under active debugging, but they would want to go away before the polishing is done.
OK, I used it merely for checking that the tests work on older version of git svn, and I didn't break the backward compatibility by accident. Will be dropped from next version of the patch.
Quoted 8 lines
What does En-El stand for? We often see (but not in Git where we prefer LF for that purpose)
NL=' ' ;# newlineand using $NL to mean "empty" may be misleading to the readers.
NL means newline. The new line characters implicitly added after each commit message line, that's why the value is empty. But, yes, this can be misleading. I'd prefer to keep it short, so would EL (i.e. `empty-line') be an acceptable name?
Quoted 2 lines
t/t9165-git-svn-import-messages.sh line 44
Quoted 1 line
t/t9165-git-svn-import-messages.sh new file +1
-0+ N=$((N + 1)) &&
Sorry, it was a typo, I meant to use $(($N + 1)). Thanks for catching this.
Quoted 7 lines
next_N () { N=$(($N + 1)) && ... }(the above also has two style fixes).
Just to be sure: shall the `...' line start a new level of indentation or is it a typo? (I guess that the two style fixes are just after the function name.)
Thanks a lot,
robert
Re: [PATCH/RFC] git svn: optionally trim imported log messages
Quoted 9 lines · Robert Luberda
Quoted 2 lines
I think it would be saner to call them "trailers" to avoid confusion.
Thanks, I haven't got any idea how to call them, especially because existing git documentation refers to them just by using the word `line', e.g.:
git-am.txt: Add a
Signed-off-by:line to the commit message,
git-cherry-pick.txt: Add Signed-off-by line at the end of the
Then "line" is fine; they never come before the body, and are certainly not headers.
Quoted 7 lines
Quoted 2 lines
There needs an explanation to the reader why this is an optional feature.
OK, I'll add some explanation. Basically it is optional, per Eric request, for backward compatibility to make it possible to work on a centralized clone of svn repository by people using both old and new versions of git svn.
That matches my recollection. I didn't ask you to explain it to me, by the way, as I've skimmed the discussion during the review.
I wanted the resulting history and the documentation to explain that to git-svn users.
Quoted 4 lines
NL means newline. The new line characters implicitly added after each commit message line, that's why the value is empty. But, yes, this can be misleading. I'd prefer to keep it short, so would EL (i.e. `empty-line') be an acceptable name?
I'd rather call it "$EMPTY"; $NL is already obscure, nobody uses $EL.
Quoted 9 lines
Quoted 6 lines
next_N () { N=$(($N + 1)) && ... }(the above also has two style fixes).
Just to be sure: shall the `...' line start a new level of indentation or is it a typo?
It was meant to align with "N=", but perhaps HT and quoting interacted badly or something.
Quoted 1 line · Robert Luberda
I have been quite a busy recently, so it took me longer that I thought.
No worries, thanks for following up.
Quoted 5 lines
It was quite hard for me to think some sensible option name, and finally have chosen --trim-svn-log (svn.trimsvnlog as config key name). Please let me know if such name is ok for you. If not, I'll try to find a different one (but as I wrote I'm not really good at giving names to options/functions/variables, etc. :()
I think having "svn" in "svn.trimsvnlog" twice is redundant and not ideal. Perhaps just --trim-log and svn.trimlog?
Quoted 6 lines
I considered making the option a default one for new git svn clones, so that existing repositories would use the older approach, but I gave up the idea, and implemented the simpler solution, in which the option must be given explicitly if one needs the new behavior. If making it a default for new clones would make sense for you, I can try to implement this as well.
Default behavior should not change, especially not without warning.
Quoted 3 lines
For consistency, the `--add-author-from' option was modified not to add an extra new line before 'From: ' line when the newly introduced option is in effect.
OK.
Quoted 7 lines
I'm sending a new patch in next e-mail, could you please look at it and share any comments you might have? One thing I was not sure about is the requirement, introduced in the change, of having a whitespace character after a colon in pseudo-header lines
(e.g. `From:somebody <[email protected]>' won't be considered as a pseudo-header) - is this consistent with a way git handles headers/pseudo-headers?
Both git-send-email and git-am check for space after these headers, so git-svn should, too
Quoted 5 lines · Eric Wong
Quoted 1 line · Robert Luberda
I have been quite a busy recently, so it took me longer that I thought.
No worries, thanks for following up.
Quoted 8 lines
Quoted 5 lines
It was quite hard for me to think some sensible option name, and finally have chosen --trim-svn-log (svn.trimsvnlog as config key name). Please let me know if such name is ok for you. If not, I'll try to find a different one (but as I wrote I'm not really good at giving names to options/functions/variables, etc. :()
I think having "svn" in "svn.trimsvnlog" twice is redundant and not ideal. Perhaps just --trim-log and svn.trimlog?
Do we ever want to trim "our" log when relaying the Git commits back to subversion? Having "svn" in "trimsvnlog" makes it clear that the logs from subversion side is getting trimmed.
Quoted 1 line
Default behavior should not change, especially not without warning.
Makes sense.
Quoted 8 lines · Junio C Hamano
Quoted 3 lines · Eric Wong
I think having "svn" in "svn.trimsvnlog" twice is redundant and not ideal. Perhaps just --trim-log and svn.trimlog?
Do we ever want to trim "our" log when relaying the Git commits back to subversion? Having "svn" in "trimsvnlog" makes it clear that the logs from subversion side is getting trimmed.
`git commit' already trims the messages (except for removing the leading whitespaces from the first non-whitespace-only line) and git svn doesn't change that.
The new option affects the way the messages are imported from svn to git, with one exception when the --add-author-from option of dcommit is used (in which case it may skip adding an extra new line character before the `From: ' line). For that reason --trim-svn-log might be a better name.
Regards,
robert
Quoted 14 lines · Robert Luberda
Quoted 8 lines · Junio C Hamano
Quoted 3 lines · Eric Wong
I think having "svn" in "svn.trimsvnlog" twice is redundant and not ideal. Perhaps just --trim-log and svn.trimlog?
Do we ever want to trim "our" log when relaying the Git commits back to subversion? Having "svn" in "trimsvnlog" makes it clear that the logs from subversion side is getting trimmed.
`git commit' already trims the messages (except for removing the leading whitespaces from the first non-whitespace-only line) and git svn doesn't change that.
Quoted 5 lines
The new option affects the way the messages are imported from svn to git, with one exception when the --add-author-from option of dcommit is used (in which case it may skip adding an extra new line character before the `From: ' line). For that reason --trim-svn-log might be a better name.
OK. I now agree --trim-svn-log is a better name :>