Updating build statuses for all branches only periodically is still too slow. Now it only updates statuses for branches from remotes/origin that also have a local copy
This commit is contained in:
@@ -133,8 +133,12 @@ update_travis_ci_status() {
|
|||||||
|
|
||||||
# Either update all branches, or only current branch
|
# Either update all branches, or only current branch
|
||||||
if [ "$UPDATE_ALL_BRANCHES" = "true" ]; then
|
if [ "$UPDATE_ALL_BRANCHES" = "true" ]; then
|
||||||
# All branches on origin remotes
|
local all_branches=$(\git branch -a)
|
||||||
local branches="$(\git branch -a | sed "s/ *remotes\/origin\///;tm;d;:m;/^HEAD/d;")"
|
# All branches on origin remote that have local copies
|
||||||
|
local branches=$(comm -12 <(echo "$all_branches" | \
|
||||||
|
sed "s/ *remotes\/origin\///;tm;d;:m;/^HEAD/d;" | sort) \
|
||||||
|
<(echo "$all_branches" | \
|
||||||
|
sed "/ *remotes\//d;s/^[\* ]*//" | sort))
|
||||||
# Create a new, blank temp file
|
# Create a new, blank temp file
|
||||||
echo -n > "$tmp_stat_file"
|
echo -n > "$tmp_stat_file"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user