cvsserver annotates each commit message by "via git-CVS emulator". This is made configurable via gitcvs.commitmsgannotation. Signed-off-by: Fabian Emmes <fabian.emmes@xxxxxxxxxxxxxx> Signed-off-by: Lars Noschinski <lars@xxxxxxxxxxxxxxxxxxxx> --- Documentation/config.txt | 4 ++++ git-cvsserver.perl | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index b233fe5..ee937fe 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -723,6 +723,10 @@ gc.rerereunresolved:: kept for this many days when 'git-rerere gc' is run. The default is 15 days. See linkgit:git-rerere[1]. +gitcvs.commitmsgannotation:: + Append this string to each commit message. Set to empty string + to disable this feature. Defaults to "via git-CVS emulator". + gitcvs.enabled:: Whether the CVS server interface is enabled for this repository. See linkgit:git-cvsserver[1]. diff --git a/git-cvsserver.perl b/git-cvsserver.perl index b0a805c..cbcaeb4 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -1358,7 +1358,13 @@ sub req_ci # write our commit message out if we have one ... my ( $msg_fh, $msg_filename ) = tempfile( DIR => $TEMP_DIR ); print $msg_fh $state->{opt}{m};# if ( exists ( $state->{opt}{m} ) ); - print $msg_fh "\n\nvia git-CVS emulator\n"; + if ( defined ( $cfg->{gitcvs}{commitmsgannotation} ) ) { + if ($cfg->{gitcvs}{commitmsgannotation} !~ /^\s*$/ ) { + print $msg_fh "\n\n".$cfg->{gitcvs}{commitmsgannotation}."\n" + } + } else { + print $msg_fh "\n\nvia git-CVS emulator\n"; + } close $msg_fh; my $commithash = `git-commit-tree $treehash -p $parenthash < $msg_filename`; -- 1.6.1.rc2.20.gde0d -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html