summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5209eda)
raw | patch | inline | side by side (parent: 5209eda)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Wed, 26 Jul 2006 20:51:52 +0000 (22:51 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 26 Jul 2006 21:32:13 +0000 (14:32 -0700) |
git-update-ref writes into the lockfile, and renames it afterwards. Like
commit v1.3.0-rc3~22, it is not only cleaner, but also helps with shared
setups: every developer can have a different primary group; what matters
is that $GIT_DIR/refs/heads has to be writable by a group you are in.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit v1.3.0-rc3~22, it is not only cleaner, but also helps with shared
setups: every developer can have a different primary group; what matters
is that $GIT_DIR/refs/heads has to be writable by a group you are in.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsserver.perl | patch | blob | history |
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 5b73837bb1e1f0b29ec089942a6a785fc38f1cbc..2130d57020de2dae570b7be0d9a516389bd1829f 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
exit;
}
- open FILE, ">", "$ENV{GIT_DIR}refs/heads/$state->{module}";
- print FILE $commithash;
- close FILE;
+ print LOCKFILE $commithash;
$updater->update();
}
close LOCKFILE;
- unlink($lockfile);
+ my $reffile = "$ENV{GIT_DIR}refs/heads/$state->{module}";
+ unlink($reffile);
+ rename($lockfile, $reffile);
chdir "/";
print "ok\n";