summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-07-28 13:18:19 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-07-28 13:18:19 -0700
commit922819c3d51bb048fe2194f33c275abe4c3d4b6a (patch)
tree7439d461ecc6652a4c900a6994261b071c0482ad
parentMerge branch 'js/alias-p' (diff)
parentcvsserver: imitate git-update-ref when committing (diff)
downloadtgif-922819c3d51bb048fe2194f33c275abe4c3d4b6a.tar.xz
Merge branch 'js/cvs'
* js/cvs: cvsserver: imitate git-update-ref when committing
-rwxr-xr-xgit-cvsserver.perl8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 5b73837bb1..2130d57020 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -1142,9 +1142,7 @@ sub req_ci
exit;
}
- open FILE, ">", "$ENV{GIT_DIR}refs/heads/$state->{module}";
- print FILE $commithash;
- close FILE;
+ print LOCKFILE $commithash;
$updater->update();
@@ -1171,7 +1169,9 @@ sub req_ci
}
close LOCKFILE;
- unlink($lockfile);
+ my $reffile = "$ENV{GIT_DIR}refs/heads/$state->{module}";
+ unlink($reffile);
+ rename($lockfile, $reffile);
chdir "/";
print "ok\n";