File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 77# dns_check (ahead 1) | (behind 112) origin/master
88# master (ahead 2) | (behind 0) origin/master
99
10+ tot_diff=0
11+
1012git for-each-ref --format=" %(refname:short) %(upstream:short)" refs/heads | \
1113while read local remote
1214do
1315 [ -z " $remote " ] && continue
1416 git rev-list --left-right ${local} ...${remote} -- 2> /dev/null > /tmp/git_upstream_status_delta || continue
1517 LEFT_AHEAD=$( grep -c ' ^<' /tmp/git_upstream_status_delta)
1618 RIGHT_AHEAD=$( grep -c ' ^>' /tmp/git_upstream_status_delta)
19+ tot_diff=$LEFT_AHEAD +$RIGHT_AHEAD +$tot_diff
1720 echo " $local (ahead $LEFT_AHEAD ) | (behind $RIGHT_AHEAD ) $remote "
18- done
21+ done
22+
23+ if [ " $tot_diff " == " 0" ]; then
24+ echo " Everything is synchronized."
25+ fi
You can’t perform that action at this time.
0 commit comments