From: martin f. krafft Date: Thu, 31 Oct 2019 03:40:03 +0000 (+1300) Subject: add vcsh post-init hook to seed gitignore X-Git-Url: https://git.madduck.net/etc/vcsh.git/commitdiff_plain/b37d9708ad84dfa19ae40d878f9d354855072fa9 add vcsh post-init hook to seed gitignore --- diff --git a/.config/vcsh/hooks-available/post-init.write-gitignore b/.config/vcsh/hooks-available/post-init.write-gitignore new file mode 100755 index 0000000..012db00 --- /dev/null +++ b/.config/vcsh/hooks-available/post-init.write-gitignore @@ -0,0 +1,11 @@ +#!/bin/sh + +cd $GIT_WORK_TREE + +GIT_IGNORE_FILE=.gitignore.d/$VCSH_REPO_NAME + +touch $GIT_IGNORE_FILE +git add -f $GIT_IGNORE_FILE +vcsh write-gitignore $VCSH_REPO_NAME +git add $GIT_IGNORE_FILE +git commit -m'seed gitignore file' diff --git a/.config/vcsh/hooks-enabled/post-init.write-gitignore b/.config/vcsh/hooks-enabled/post-init.write-gitignore new file mode 120000 index 0000000..23224f2 --- /dev/null +++ b/.config/vcsh/hooks-enabled/post-init.write-gitignore @@ -0,0 +1 @@ +../hooks-available/post-init.write-gitignore \ No newline at end of file diff --git a/.gitignore.d/vcsh b/.gitignore.d/vcsh index 8cda741..10bb4ea 100644 --- a/.gitignore.d/vcsh +++ b/.gitignore.d/vcsh @@ -1,2 +1,4 @@ * +!/.config/vcsh/hooks-available/post-init.write-gitignore +!/.config/vcsh/hooks-enabled/post-init.write-gitignore !/.gitignore.d/vcsh