dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 82a79799acdbbd70c1d9498026dd37113ddc6c34
parent 9692dc860cb1433ae558e1c0a99b8f96467456e7
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Mon,  3 Dec 2018 15:02:07 +0100

Add git template dir with ctags hooks

Diffstat:
Agit/git_template/hooks/ctags | 8++++++++
Agit/git_template/hooks/post-checkout | 2++
Agit/git_template/hooks/post-commit | 2++
Agit/git_template/hooks/post-merge | 2++
Agit/git_template/hooks/post-rewrite | 4++++
Mgit/gitconfig | 2++
6 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/git/git_template/hooks/ctags b/git/git_template/hooks/ctags @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -e +PATH="/usr/local/bin:$PATH" +dir="`git rev-parse --git-dir`" +trap 'rm -f "$dir/$$.tags"' EXIT +git ls-files | \ + ctags --tag-relative -L - -f "$dir/$$.tags" --languages=-javascript,sql +mv "$dir/$$.tags" "$dir/tags" diff --git a/git/git_template/hooks/post-checkout b/git/git_template/hooks/post-checkout @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/git_template/hooks/post-commit b/git/git_template/hooks/post-commit @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/git_template/hooks/post-merge b/git/git_template/hooks/post-merge @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/git_template/hooks/post-rewrite b/git/git_template/hooks/post-rewrite @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac diff --git a/git/gitconfig b/git/gitconfig @@ -47,3 +47,5 @@ tool = vimdiff [core] autocrlf = input +[init] + templatedir = /Users/alex/.dotfiles/git/git_template