clarify that combined hook program is deprecated, not entire hook special remote
This commit is contained in:
parent
790600f7b2
commit
2fb200a110
1 changed files with 6 additions and 5 deletions
|
@ -73,17 +73,18 @@ The settings to use in git config for the hook commands are as follows:
|
||||||
|
|
||||||
## combined hook program
|
## 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
|
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.
|
program that handles everything, and set a single hook to make it be used.
|
||||||
|
|
||||||
# git config annex.demo-hook /usr/local/bin/annexdemo
|
# git config annex.demo-hook /usr/local/bin/annexdemo
|
||||||
# git annex initremote mydemorepo type=hook hooktype=demo encryption=none
|
# git annex initremote mydemorepo type=hook hooktype=demo encryption=none
|
||||||
|
|
||||||
The program just needs to look at the `ANNEX_ACTION` environment variable
|
But, doing that is deprecated -- it's better, and not much harder,
|
||||||
to see what it's being asked to do. For example:
|
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 """
|
[[!format sh """
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue