summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8104ebf)
raw | patch | inline | side by side (parent: 8104ebf)
author | Fabian Emmes <fabian.emmes@rwth-aachen.de> | |
Fri, 2 Jan 2009 15:40:13 +0000 (16:40 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Jan 2009 22:15:22 +0000 (14:15 -0800) |
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>
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>
Documentation/config.txt | patch | blob | history | |
git-cvsserver.perl | patch | blob | history |
index 52786c7df5eb902cf97fee165ceb25e3c4763e9e..b4e0eea9f70a62ac84fe506a27acd72d4037faa4 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
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 b0a805c688f59af29e1f25b514d73f3991285dee..cbcaeb44e44c10babc51b78348cf50d74449fe65 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
# 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`;