diff --git a/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks.mdwn b/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks.mdwn index b5ba7190af..95cd81a9c1 100644 --- a/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks.mdwn +++ b/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks.mdwn @@ -3,3 +3,6 @@ The idea is stemmed from discussions/problems with using freeze/thaw hooks, and - test e.g. if custom freeze/thaw are needed (before even git annex decides to switch to adjusted branches mode) and setup that repo accordingly for git-annex to proceed without flipping out into adjusted branch mode - may be improved/custom pidlock detection (on one of my servers I remember needing to just hardcode in ~/.gitconfig to use pidlock although that was relevant only for some paths). - similarly do some other testing which could allow or disallow some git-annex decision such as e.g. use of adjusted unlocked branch + +[[!meta author=yoh]] +[[!tag projects/openneuro]] diff --git a/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks/comment_3_1dcbe1b1287f7bad262995b72ab0660b._comment b/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks/comment_3_1dcbe1b1287f7bad262995b72ab0660b._comment new file mode 100644 index 0000000000..f5d4fe42ee --- /dev/null +++ b/doc/todo/Support___40__globally_configured__41_____34__annex_init__34___hooks/comment_3_1dcbe1b1287f7bad262995b72ab0660b._comment @@ -0,0 +1,22 @@ +[[!comment format=mdwn + username="yarikoptic" + avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4" + subject="on the init hook" + date="2025-01-10T17:33:14Z" + content=""" +> There could be a generalized hook config, eg `git config annex.pre-hook my-hook` could make `git-annex init run my-hook git-annex init` and same for other git-annex commands. + +I feel that having such a generic gateway hook would be + +- not aligned to how `.git/hooks` operate (separate scripts for different operations) +- make it harder to provide CLI options handling given that different command hooks might have different options (via env var or not) +- add increasing performance hit with increasing number of commands potentially calling such a generic hook + +If someone wanted such one, they could create a \"symlink\" driven generic hook which would have resolved its action upon `$0` name as some tools etc do. + +I really feel that having `annex.pre-{command}-hook` set of configurations would be cleaner. + +> It sounds like you would want a failure of such a hook to prevent the git-annex command from running. Is that right? + +I think so... and I think that's how git hooks perform? (less git-annex is special the better) +"""]]