aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-29 18:11:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-29 18:11:45 +1200
commite7f5ef531ab3f8ec35b9b62e7c6ad823b5ea9148 (patch)
tree1e72fc3093d501d37b7867f2ab55b5caee7d145c
parentRefine shebang patterns in scripts.vim a bit (diff)
downloaddotfiles-e7f5ef531ab3f8ec35b9b62e7c6ad823b5ea9148.tar.gz
dotfiles-e7f5ef531ab3f8ec35b9b62e7c6ad823b5ea9148.zip
Add some nice comments to post-update Git hook
-rw-r--r--git/template/hooks/post-update.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/git/template/hooks/post-update.sh b/git/template/hooks/post-update.sh
index 7199a513..232c0ecd 100644
--- a/git/template/hooks/post-update.sh
+++ b/git/template/hooks/post-update.sh
@@ -1,4 +1,11 @@
+# Update server info automatically if this is a bare repository
+
+# Get whether this is bare from git-config(1); this returns the strings 'true'
+# or 'false'; I don't think you can coerce the exit value instead, which would
+# have been nice
bare=$(git config core.bare)
+
+# If it's 'true', update the server info so that this works via cgit or Gitweb
case $bare in
true) git update-server-info ;;
esac