dont collect upstream details from big repos

This commit is contained in:
Paul Irish 2019-10-11 12:09:45 -07:00
parent a7ae3198bd
commit 6a5f7e7979

View file

@ -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|"