diff --git a/git-recent b/git-recent index cb1fad7..495970c 100755 --- a/git-recent +++ b/git-recent @@ -32,13 +32,21 @@ while getopts "n:" opt; do done shift $((OPTIND-1)) +## dont collect upstream details ([ahead 2, behind 54]) for big-ass git repos, it adds >5s. +# TODO, use `git count-objects -v` and consider `in-pack` and `size-pack` instead of special casing chromium +if git config --get remote.origin.url | grep -q chromium.googlesource.com; then + upstream_deets="" +else + upstream_deets="%(color:yellow)%(upstream:track)%(color:reset)" +fi + format="\ %(HEAD) \ $branch|\ %(color:bold red)%(objectname:short)%(color:reset) \ %(color:bold green)(%(committerdate:relative))%(color:reset) \ %(color:bold blue)%(authorname)%(color:reset) \ -%(color:yellow)%(upstream:track)%(color:reset) +$upstream_deets $spacer|\ %(contents:subject) $spacer|"