]> git.madduck.net Git - etc/vcsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add vcsh post-init hook to seed gitignore
authormartin f. krafft <madduck@madduck.net>
Thu, 31 Oct 2019 03:40:03 +0000 (16:40 +1300)
committermartin f. krafft <madduck@madduck.net>
Thu, 31 Oct 2019 08:42:39 +0000 (21:42 +1300)
.config/vcsh/hooks-available/post-init.write-gitignore [new file with mode: 0755]
.config/vcsh/hooks-enabled/post-init.write-gitignore [new symlink]
.gitignore.d/vcsh

diff --git a/.config/vcsh/hooks-available/post-init.write-gitignore b/.config/vcsh/hooks-available/post-init.write-gitignore
new file mode 100755 (executable)
index 0000000..012db00
--- /dev/null
@@ -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 (symlink)
index 0000000..23224f2
--- /dev/null
@@ -0,0 +1 @@
+../hooks-available/post-init.write-gitignore
\ No newline at end of file
index 8cda741fd0be0ed796463baf9d1d0d8325ff9f5d..10bb4eaed25d2a2c2a6253cda75c7439f9b5117a 100644 (file)
@@ -1,2 +1,4 @@
 *
+!/.config/vcsh/hooks-available/post-init.write-gitignore
+!/.config/vcsh/hooks-enabled/post-init.write-gitignore
 !/.gitignore.d/vcsh