aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2020-05-20 16:03:37 -0600
committerAdam Hovorka <[email protected]>2020-05-20 16:03:37 -0600
commit5c22c8cdbfeb707c806f0bbf3401efcd7eb6ad69 (patch)
treea7fabf50ab3c2cec86221eb245ea1b85df2eb399
parent86fbbd84cf3e0321d75239fa31a80265ffbc8b18 (diff)
Shrink padding inside `git l`
-rw-r--r--base/gitconfig4
1 files changed, 3 insertions, 1 deletions
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