From a9ded3e131bc9eb76550e6babe414f9dd990a013 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sat, 2 Nov 2019 21:02:21 +1300 Subject: [PATCH 1/1] Only run init hook during init --- .config/vcsh/hooks-available/post-init.write-gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/vcsh/hooks-available/post-init.write-gitignore b/.config/vcsh/hooks-available/post-init.write-gitignore index 012db00..4039ca8 100755 --- a/.config/vcsh/hooks-available/post-init.write-gitignore +++ b/.config/vcsh/hooks-available/post-init.write-gitignore @@ -1,5 +1,9 @@ #!/bin/sh +# only run during an actual init (not when init is called as part of e.g. +# clone). +[ $VCSH_COMMAND = init ] || exit 0 + cd $GIT_WORK_TREE GIT_IGNORE_FILE=.gitignore.d/$VCSH_REPO_NAME -- 2.39.5