]> git.madduck.net Git - code/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:

Update setup() to only add .gitignore/$repo if it exists
authorRichard Hartmann <richih.mailinglist@gmail.com>
Wed, 30 Nov 2011 02:22:07 +0000 (03:22 +0100)
committerRichard Hartmann <richih.mailinglist@gmail.com>
Wed, 30 Nov 2011 02:22:07 +0000 (03:22 +0100)
vcsh

diff --git a/vcsh b/vcsh
index 04ea186c4c28ce7671c177fc376694e3feb4fb0c..d05f26956bc7f55bafb5c0e76db0751303c1b2d8 100755 (executable)
--- a/vcsh
+++ b/vcsh
@@ -168,8 +168,7 @@ setup() {
        git config core.worktree     "$GIT_WORK_TREE"
        git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME"
        git config vcsh.vcsh         'true'
-       touch   "$HOME/.gitignore.d/$VCSH_REPO_NAME" || error "could not touch '$HOME/.gitignore.d/$VCSH_REPO_NAME'"
-       git add "$HOME/.gitignore.d/$VCSH_REPO_NAME"
+       [ -e "$HOME/.gitignore.d/$VCSH_REPO_NAME" ] && git add -f "$HOME/.gitignore.d/$VCSH_REPO_NAME"
 }
 
 use() {