mirror of
https://github.com/paulirish/git-recent.git
synced 2026-09-10 07:26:16 -04:00
dont collect upstream details from big repos
This commit is contained in:
parent
a7ae3198bd
commit
6a5f7e7979
10
git-recent
10
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|"
|
||||
|
|
|
|||
Loading…
Reference in a new issue