diff --git a/.config/git/config b/.config/git/config index 5895ff7..cd6b960 100644 --- a/.config/git/config +++ b/.config/git/config @@ -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]++' diff --git a/.local/bin/scripts/git-ln b/.local/bin/scripts/git-ln new file mode 100755 index 0000000..27f63be --- /dev/null +++ b/.local/bin/scripts/git-ln @@ -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