From: Joey Hess Date: Thu, 11 Jan 2024 15:04:07 +0000 (-0400) Subject: clarify that combined hook program is deprecated, not entire hook special remote X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~29^2~49 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2fb200a110a94eaceb274543eb0db258e9e8f9da;p=git-annex.git clarify that combined hook program is deprecated, not entire hook special remote --- diff --git a/doc/special_remotes/hook.mdwn b/doc/special_remotes/hook.mdwn index 0bb76d98a0..1878aba704 100644 --- a/doc/special_remotes/hook.mdwn +++ b/doc/special_remotes/hook.mdwn @@ -73,17 +73,18 @@ The settings to use in git config for the hook commands are as follows: ## combined hook program -This interface is deprecated -- it's better, and not much harder, -to write an [[external_special_remote|external]]! - Rather than setting all of the above hooks, you can write a single program that handles everything, and set a single hook to make it be used. # git config annex.demo-hook /usr/local/bin/annexdemo # git annex initremote mydemorepo type=hook hooktype=demo encryption=none -The program just needs to look at the `ANNEX_ACTION` environment variable -to see what it's being asked to do. For example: +But, doing that is deprecated -- it's better, and not much harder, +to write an [[external_special_remote|external]]! + +If you still want to do this, the program just needs to look at the +`ANNEX_ACTION` environment variable to see what it's being asked to do. +For example: [[!format sh """ #!/bin/sh