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 | 205be1ee07fe509ecfce3825d3709c32f4161e31 (diff) | |
parent | cadbcf2712ff346dcd757d0b116359380920b2a4 (diff) | |
download | git-922819c3d51bb048fe2194f33c275abe4c3d4b6a.tar.gz |
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"; |