summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-04-19 15:24:25 +0100
committerUrbain Vaes <urbain@vaes.uk>2016-04-19 15:24:25 +0100
commite146e947c52ac4adbe426b3f893faff1e46ed5f8 (patch)
tree1605bf4eb78cc619988c92632f3cee2a56143fd5 /git
parent83bd503208d45fa837348441196dd07223b13e3e (diff)
Use GNU stow for dotfiles management
Diffstat (limited to 'git')
-rwxr-xr-xgit/.git_template/hooks/ctags8
-rwxr-xr-xgit/.git_template/hooks/post-checkout2
-rwxr-xr-xgit/.git_template/hooks/post-commit2
-rwxr-xr-xgit/.git_template/hooks/post-merge2
-rwxr-xr-xgit/.git_template/hooks/post-rewrite4
-rw-r--r--git/.gitconfig15
6 files changed, 33 insertions, 0 deletions
diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags
new file mode 100755
index 0000000..a9a2150
--- /dev/null
+++ b/git/.git_template/hooks/ctags
@@ -0,0 +1,8 @@
+#!/bin/sh
+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
new file mode 100755
index 0000000..84f17ed
--- /dev/null
+++ b/git/.git_template/hooks/post-checkout
@@ -0,0 +1,2 @@
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
diff --git a/git/.git_template/hooks/post-commit b/git/.git_template/hooks/post-commit
new file mode 100755
index 0000000..84f17ed
--- /dev/null
+++ b/git/.git_template/hooks/post-commit
@@ -0,0 +1,2 @@
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
diff --git a/git/.git_template/hooks/post-merge b/git/.git_template/hooks/post-merge
new file mode 100755
index 0000000..84f17ed
--- /dev/null
+++ b/git/.git_template/hooks/post-merge
@@ -0,0 +1,2 @@
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
diff --git a/git/.git_template/hooks/post-rewrite b/git/.git_template/hooks/post-rewrite
new file mode 100755
index 0000000..fe8972d
--- /dev/null
+++ b/git/.git_template/hooks/post-rewrite
@@ -0,0 +1,4 @@
+#!/bin/sh
+case "$1" in
+ rebase) exec .git/hooks/post-merge ;;
+esac
diff --git a/git/.gitconfig b/git/.gitconfig
new file mode 100644
index 0000000..0e6c6f7
--- /dev/null
+++ b/git/.gitconfig
@@ -0,0 +1,15 @@
+[user]
+ name = Urbain Vaes
+ email = mail@urbainvaes.com
+[init]
+ templatedir = ~/.git_template
+[alias]
+ ctags = !.git/hooks/ctags
+[push]
+ default = simple
+[status]
+ submodulesummary = 1
+[alias]
+ sdiff = !git diff && git submodule foreach 'git diff'
+ spush = push --recurse-submodules=on-demand
+ supdate = submodule update --remote --merge