From 3d9718102201b0be6ab314ca7a336d8791aba6b2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 28 Sep 2018 18:05:54 +0300 Subject: [PATCH] Add post-update to update git-scripts after pushing to git-scripts.git --- hooks/post-update | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 hooks/post-update diff --git a/hooks/post-update b/hooks/post-update new file mode 100755 index 0000000..45de97e --- /dev/null +++ b/hooks/post-update @@ -0,0 +1,11 @@ +#!/bin/sh +# Update git-scripts after pushing to master at git-scripts.git. +# This hook must be in git-scripts.git/hooks/post-update. + +for ref in "$@"; do + if [ "$ref" = refs/heads/master ]; then + unset GIT_DIR + cd ../git-scripts && + exec git pull ../git-scripts.git master + fi +done -- 2.39.2