From 280514e1dff3284549175cb0e8edb9b796e8891e Mon Sep 17 00:00:00 2001 From: Fabian Emmes Date: Fri, 2 Jan 2009 16:40:13 +0100 Subject: cvsserver: add option to configure commit message cvsserver annotates each commit message by "via git-CVS emulator". This is made configurable via gitcvs.commitmsgannotation. Signed-off-by: Fabian Emmes Signed-off-by: Lars Noschinski Signed-off-by: Junio C Hamano --- git-cvsserver.perl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'git-cvsserver.perl') diff --git a/git-cvsserver.perl b/git-cvsserver.perl index b0a805c688..cbcaeb44e4 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`; -- cgit v1.2.1