config/git: move ln alias out

This commit is contained in:
xeruf 2021-07-05 19:59:15 +02:00
parent 81f4e66774
commit 9952149e77
2 changed files with 4 additions and 1 deletions

View File

@ -105,7 +105,6 @@
lgu = lg HEAD @{push}
lo = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges
lp = log -p --date=local
ln = !git --no-pager lo "-$(a=$(git rev-list --count HEAD...@{push} 2>/dev/null); expr $a + 3 \\& ${a:-0} \\> 3 \\| 6)" --color=always --graph HEAD @{u} 2>/dev/null | head -9 || git --no-pager lo -7
my = lo --author [Jj]anek
standup = my --since yesterday --all
co-authors = !git log | grep -i Co-Authored | awk '!a[$0]++'

4
.local/bin/scripts/git-ln Executable file
View File

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