X-Git-Url: https://git.madduck.net/etc/vcsh.git/blobdiff_plain/b37d9708ad84dfa19ae40d878f9d354855072fa9..a9ded3e131bc9eb76550e6babe414f9dd990a013:/.config/vcsh/hooks-available/post-init.write-gitignore 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