diff --git a/doc/todo/git-hook_to_sanity-check_git-annex_branch_pushes.mdwn b/doc/todo/git-hook_to_sanity-check_git-annex_branch_pushes.mdwn index 7eb02c3ff4..3f347cb02a 100644 --- a/doc/todo/git-hook_to_sanity-check_git-annex_branch_pushes.mdwn +++ b/doc/todo/git-hook_to_sanity-check_git-annex_branch_pushes.mdwn @@ -38,4 +38,18 @@ This might be too limiting for some situations: Python implementation --------------------- -I started doing an implementation of this in Python here. For technical reasons the git repo is not publicly available, but here's a [dump](http://paste.debian.net/232563/) of the code. I went through what seems to be a rather convoluted process with libgit there because I wanted to have some proper unit tests and generating git commands by hand in a shell script is rather painful.Also, it currently adopts a "blocking" approach, ie. it blocks known problems, but maybe it should be based on an "allow" approach, that is: only allow certain things to go through. So far it only forbids removals and changes to trust.log. A bunch of stuff is still missing like parameters (to allow changing the list of protected files) and checking the log tracking info. Feedback welcome. --[[anarcat]] +I started doing an implementation of this in Python here. The code is +available in [pre-receive-gitannex-check.py](https://gitlab.com/anarcat/puppet-git-annex/raw/a7333fd26af19eb5ee662c261a498c868b8b67e3/files/pre-receive-gitannex-check.py) (permalink, see also +the [latest version](https://gitlab.com/anarcat/puppet-git-annex/blob/master/files/pre-receive-gitannex-check.py)). + +I went through what seems to be a rather convoluted design with libgit +because I wanted to have some proper unit tests and generating git +commands by hand in a shell script is rather painful. Also, it +currently adopts a "blocking" approach, ie. it blocks known problems, +but maybe it should be based on an "allow" approach, that is: only +allow certain things to go through. + +So far it only forbids removals and changes to trust.log. A bunch of +stuff is still missing like parameters (to allow changing the list of +protected files) and checking the log tracking info. Feedback +welcome. --[[anarcat]]