config/git: add global hooksPath

This commit is contained in:
xeruf 2021-07-20 17:21:27 +02:00
parent 537bcf9d84
commit d401be9aab
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
autocrlf = input
editor = nvim
pager = diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | less --RAW-CONTROL-CHARS --quit-on-intr
hooksPath = .dev/githooks
[interactive]
diffFilter = diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33
[submodule]

View File

@ -1,5 +1,5 @@
#!/bin/sh
set -o pipefail
upCount=$(git rev-list --count HEAD...@{push} 2>/dev/null)
count=$(expr $a + 3 \& ${upCount:-0} \> 3 \| 6)
count=$(expr ${upCount:-0} + 3 \& ${upCount:-0} \> 3 \| 6)
git --no-pager lo -$count --color=always --graph HEAD @{push} | head -9 || git --no-pager lo -7