question about post-receive

This commit is contained in:
yarikoptic 2019-09-27 01:48:36 +00:00 committed by admin
parent 38a8a671d6
commit 22aa7b290d

View file

@ -0,0 +1,13 @@
I looked into post-receive hook of an arbitrary git/git-annex repo to find
[[!format sh """
(git-annex)hopa:/tmp/testds/.git/hooks[master]
$> cat post-receive
#!/bin/sh
# automatically configured by git-annex
if git annex post-receive --help >/dev/null 2>&1; then git annex post-receive; fi
"""]]
and wondered why it actually needs conditioning? `--help` runs for me longer (40-50ms) than actual `git annex post-receive` call (20ms) when there is nothing todo. So I wondered why wasting time on `--help`?
[[!meta author=yoh]]