mirror of
https://github.com/paulirish/git-recent.git
synced 2026-09-10 07:26:16 -04:00
objcount
This commit is contained in:
parent
6136187009
commit
1f6b93c2d0
|
|
@ -33,10 +33,10 @@ while getopts "n:" opt; do
|
||||||
done
|
done
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
# Dont collect upstream details ([ahead 2, behind 54]) for big-ass git repos. It's slow.
|
# Dont collect upstream details ("[ahead 2, behind 54]"") for big-ass git repos. It's slow.
|
||||||
# git count-objects -v | grep -- "in-pack" | cut -d " " -f 2
|
# TODO: count-object -v is slow. Maybe store setting in repo config somehow
|
||||||
# TODO, use `git count-objects -v` and consider `in-pack` and `size-pack` instead of special casing chromium
|
obj_count=$(git count-objects -v 2>/dev/null | grep -- "in-pack" | cut -d " " -f 2)
|
||||||
if git config --get remote.origin.url | grep -q chromium.googlesource.com; then
|
if [ "$obj_count" -gt "5000000" ]; then
|
||||||
upstream_deets=""
|
upstream_deets=""
|
||||||
else
|
else
|
||||||
upstream_deets="%(color:yellow)%(upstream:track)%(color:reset)"
|
upstream_deets="%(color:yellow)%(upstream:track)%(color:reset)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue