git-annex/doc/bugs/post-receive/comment_1_80c2251beb6a434b364346abc1b2fc02._comment
Joey Hess 177e45517f
improve back-compat of post-receive hook
* init: Improve generated post-receive hook, so it won't fail when
  run on a system whose git-annex is too old to support git-annex post-receive
* init: Update the post-receive hook when re-run in an existing repository.

This commit was sponsored by Jack Hill on Patreon.
2018-09-25 15:02:12 -04:00

22 lines
1 KiB
Text

[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2018-09-25T18:17:59Z"
content="""
> When I try to use that drive with my raspberry pi, however, there are some new git hooks (or at least one) that the older version of git annex (still the latest available in the Pi's repos, 2016, which is really old :/).
Ok, that sentance no verb. But I'll make a guess what you meant to say..
The old post-receive hook installed by the new version of git-annex runs
"git-annex post-receive", which fails on the old version of git-annex.
Yes, it's fine to delete the hook in this situation.
The fist version of git-annex to support that is 6.20170228.
The latest raspbian release is tracking debian stable AFAICS, which has
6.20170101, just slightly too old.
I agree this is a backwards compatability problem that should have been avoided.
I've made `git annex init` generate a better hook script that won't fail
with an older git-annex version. You can re-run `git annex init` in
your repository and it will update the hook script.
"""]]