summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorAndy Parkins <andyparkins@gmail.com>2007-02-27 12:49:09 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-02-27 23:51:03 (GMT)
commit1872adabccdd904f31f16276b147c63fa03079d4 (patch)
treed5af480ab8e0cb7cacbd777cd3fb8a9bcf574c10 /git-cvsserver.perl
parentada5ef3b48be7ded62af1f9b7fdb71db3024ac71 (diff)
downloadgit-1872adabccdd904f31f16276b147c63fa03079d4.zip
git-1872adabccdd904f31f16276b147c63fa03079d4.tar.gz
git-1872adabccdd904f31f16276b147c63fa03079d4.tar.bz2
cvsserver: Remove trailing "\n" from commithash in checkin function
The commithash for updating the ref is obtained from a call to git-commit-tree. However, it was returned (and stored) with the trailing newline. This meant that the later call to git-update-ref that was trying to update to $commithash was including the newline in the parameter - obviously that hash would never exist, and so git-update-ref would always fail. The solution is to chomp() the commithash as soon as it is returned by git-commit-tree. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 8e12f81..8db6e23 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -1152,6 +1152,7 @@ sub req_ci
close $msg_fh;
my $commithash = `git-commit-tree $treehash -p $parenthash < $msg_filename`;
+ chomp($commithash);
$log->info("Commit hash : $commithash");
unless ( $commithash =~ /[a-zA-Z0-9]{40}/ )