summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorFabian Emmes <fabian.emmes@rwth-aachen.de>2009-01-02 15:40:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-03 22:15:22 (GMT)
commit280514e1dff3284549175cb0e8edb9b796e8891e (patch)
treed0f7a8af470e95fc3c88bf1f9902df7a617a8256 /git-cvsserver.perl
parent8104ebfe8276657ee803cca7eb8665a78cf3ef83 (diff)
downloadgit-280514e1dff3284549175cb0e8edb9b796e8891e.zip
git-280514e1dff3284549175cb0e8edb9b796e8891e.tar.gz
git-280514e1dff3284549175cb0e8edb9b796e8891e.tar.bz2
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 <fabian.emmes@rwth-aachen.de> Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl8
1 files changed, 7 insertions, 1 deletions
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`;