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:
Nathan Broadbent
2012-02-03 17:51:40 +08:00
parent f403169176
commit f95e9a8544

View File

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