diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gitano-post-receive-hook.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/gitano-post-receive-hook.in b/bin/gitano-post-receive-hook.in index cb77e06..61df35c 100644 --- a/bin/gitano-post-receive-hook.in +++ b/bin/gitano-post-receive-hook.in @@ -213,9 +213,20 @@ function post_receive_run_supple(repo, updates) return "continue" end +function post_receive_check_head(repo, updates) + -- Check that HEAD is now resolvable in the repo + if not repo.git:get("HEAD") then + gitano.log.warn("") + gitano.log.warn(gitano.i18n.expand("WARN_HEAD_DANGLING")) + gitano.log.warn("") + end + return "continue" +end + gitano.hooks.add(gitano.hooks.names.POST_RECEIVE, -1000, post_receive_core_handler) gitano.hooks.add(gitano.hooks.names.POST_RECEIVE, 0, post_receive_run_supple) +gitano.hooks.add(gitano.hooks.names.POST_RECEIVE, 1000, post_receive_check_head) gitano.hooks.run(gitano.hooks.names.POST_RECEIVE, repo, updates) |