From 81b0c0e6edde08bf233be22e869d2c4b4a481d62 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 14:46:54 -1000 Subject: Say what the age hook does with a read-only file The header said a file the pusher cannot write stays as it was, but the hook replaces it through mv, which needs only the directory, and with stdin not a terminal mv does so without asking. That is the useful behaviour, so the header now says so, and a test holds the hook to it. Only a directory the pusher cannot write keeps the old file, which was the one case tested. --- custom/hooks/post-receive.cgit-age | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'custom/hooks/post-receive.cgit-age') diff --git a/custom/hooks/post-receive.cgit-age b/custom/hooks/post-receive.cgit-age index 82a13f0..5fdffa9 100755 --- a/custom/hooks/post-receive.cgit-age +++ b/custom/hooks/post-receive.cgit-age @@ -2,9 +2,10 @@ # Updates the age-file cgit reads for the idle column. The path below is the # default age-file, so a cgitrc that changes the setting needs the same change -# here. A file the pusher cannot write stays as it was, and nothing here -# complains or exits non-zero, so the pusher is not shown an error over a stale -# idle column. +# here. A file in a directory the pusher cannot write stays as it was, and +# nothing here complains or exits non-zero, so the pusher is not shown an error +# over a stale idle column. Replacing the file takes only its directory, so one +# the pusher cannot write itself is still brought up to date. # # To install the hook, copy or link it to hooks/post-receive in each # repository. Git runs one post-receive per repository, so fold this together -- cgit 2.12.1