X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=hooks%2Fpost-update;h=62e3b0f0818552f1d395152062094bf3e6b8ac8b;hb=1875dde8b986af5c9c0829744d111e6e606421ff;hp=45de97eaacd53d9ee7a67ac0d2ab5a157d79924d;hpb=b90789d369c5500fa85a0954869626e8aa3566ce;p=git-scripts.git diff --git a/hooks/post-update b/hooks/post-update index 45de97e..62e3b0f 100755 --- a/hooks/post-update +++ b/hooks/post-update @@ -6,6 +6,9 @@ for ref in "$@"; do if [ "$ref" = refs/heads/master ]; then unset GIT_DIR cd ../git-scripts && - exec git pull ../git-scripts.git master + if ! git remote show -n origin 2>/dev/null; then + git remote add origin ../git-scripts.git + fi && + exec git pull origin master fi done