X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/c189913f6c8eebaa6f2dcfcd666ccc4b17ec6c26..eac17e45f9d9f2713c39a8a27c0aa0a779ebb07c:/vcsh?ds=sidebyside diff --git a/vcsh b/vcsh index bf97cbf..4732e46 100755 --- a/vcsh +++ b/vcsh @@ -115,9 +115,9 @@ git_dir_exists() { } hook() { - for f in $VCSH_HOOK_D/$1* $VCSH_HOOK_D/$VCSH_REPO_NAME.$1*; do - [ -x "$f" ] || continue - "$f" + for hook in $VCSH_HOOK_D/$1* $VCSH_HOOK_D/$VCSH_REPO_NAME.$1*; do + [ -x "$hook" ] || continue + "$hook" done } @@ -167,11 +167,13 @@ run() { } setup() { + hook pre-setup use git config core.worktree "$GIT_WORK_TREE" git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME" git config vcsh.vcsh 'true' [ -e "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" ] && git add -f "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" + hook post-setup } use() {