Mercurial > kallithea
comparison Apache-License-2.0.txt @ 8087:ba6418fde72f stable
git: more elegant handling of installed pre/post-receive hook failing on direct repo access
The hook would fail with a long backtrace when get_hook_environment raise an error exception.
Instead, as first thing in the entry point from the hook, catch that situation
and report it nicely before "quietly" skipping the hook:
[mk@here myrepo]$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 204 bytes | 204.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Skipping Kallithea Git post-recieve hook 'hooks/post-receive'.
remote: Git was apparently not invoked by Kallithea: Environment variable KALLITHEA_EXTRAS not found
To /tmp/somerepo
* [new branch] master -> master
[mk@here myrepo]$
We could be paranoid and let it (and the pre hook) fail ... but that doesn't
seem helpful.
Reported by Edmund Wong at [1].
[1] https://lists.sfconservancy.org/pipermail/kallithea-general/2019q4/003071.html
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 29 Dec 2019 01:41:47 +0100 |
parents | fd2dff0588bc |
children |
comparison
equal
deleted
inserted
replaced
8086:488b52cad890 | 8087:ba6418fde72f |
---|