clarify that combined hook program is deprecated, not entire hook special remote

This commit is contained in:
Joey Hess 2024-01-11 11:04:07 -04:00
parent 790600f7b2
commit 2fb200a110
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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