From 5c22c8cdbfeb707c806f0bbf3401efcd7eb6ad69 Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Wed, 20 May 2020 16:03:37 -0600 Subject: Shrink padding inside `git l` --- base/gitconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/gitconfig b/base/gitconfig index 1221589..56fcb65 100644 --- a/base/gitconfig +++ b/base/gitconfig @@ -59,7 +59,9 @@ h = "!f() { git log $* | grep '^commit ' | cut -d' ' -f2; }; f" # Return a list of commit SHA1s details = log -n1 -p --format=fuller # View the log and diff for a commit (previous if no SHA1 provided) churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' - l = log --graph --topo-order --boundary --date=short --pretty='%>|(14) %C(1)%h%Creset %C(2)%cd%Creset %<(20)%C(4)%an%Creset │ %s%C(16)%d%Creset' + hashlength = "!f() { git log --graph --topo-order --pretty='%h' $* | wc -L; }; f" + namelength = "!f() { git log --pretty='%an' $* | wc -L; }; f" + l = "!f() { git log --graph --topo-order --boundary --date=short --pretty=\"%>|($(git hashlength $*))%C(1)%h%Creset %C(2)%cd%Creset %<($(git namelength $*))%C(4)%an%Creset │ %s%C(16)%d%Creset\" $*; }; f" la = !git l --all ll = log --decorate --stat lp = log --patch -- cgit v1.2.3-70-g09d2