diff options
author | Junio C Hamano <junkio@cox.net> | 2006-07-28 13:18:19 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-28 13:18:19 -0700 |
commit | 922819c3d51bb048fe2194f33c275abe4c3d4b6a (patch) | |
tree | 7439d461ecc6652a4c900a6994261b071c0482ad | |
parent | Merge branch 'js/alias-p' (diff) | |
parent | cvsserver: imitate git-update-ref when committing (diff) | |
download | tgif-922819c3d51bb048fe2194f33c275abe4c3d4b6a.tar.xz |
Merge branch 'js/cvs'
* js/cvs:
cvsserver: imitate git-update-ref when committing
-rwxr-xr-x | git-cvsserver.perl | 8 |
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"; |