Skip to content

Commit ac1cb7a

Browse files
authored
Merge pull request jwiegley#30 from bill-auger/master
updated git-branch-status script
2 parents 8ae43cb + 70f4b60 commit ac1cb7a

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

git-branch-status-subtree/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,9 @@ EXAMPLES:
6767
| 1999-12-31 tracked | (even) | (even) | 2000-01-01 origin/tracked |
6868
```
6969

70+
_NOTE: please direct comments, bug reports, feature requests, or PRs to the upstream repo:
71+
[https://github.com/bill-auger/git-branch-status/issues/][issues]_
7072

71-
[scrot]: http://bill-auger.github.io/git-branch-status-scrot.png "git-branch-status screenshot"
73+
74+
[scrot]: http://bill-auger.github.io/git-branch-status-scrot.png "git-branch-status screenshot"
75+
[issues]: https://github.com/bill-auger/git-branch-status/issues/

git-branch-status-subtree/git-branch-status

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# git-branch-status is distributed in the hope that it will be useful,
1818
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1919
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20-
# GNU Lesser General Public License for more details.
20+
# GNU General Public License for more details.
2121
#
2222
# You should have received a copy of the GNU General Public License version 3
2323
# along with git-branch-status. If not, see <http://www.gnu.org/licenses/>.
@@ -231,22 +231,22 @@ function GenerateReport # (a_local_branch_name a_remote_branch_name)
231231
does_local_exist=$(DoesBranchExist $local_branch)
232232

233233
# filter branches per CLI arg
234-
[ $branch ] && [ "$branch" != "$local" ] && continue
234+
[ $branch ] && [ "$branch" != "$local" ] && return
235235

236236
# filter heads
237-
[ "$local" == "HEAD" ] && continue
237+
[ "$local" == "HEAD" ] && return
238238

239239
# parse local<->remote sync status
240240
if (($does_local_exist)) && [ $remote ] ; then
241-
status=$(GetStatus) ; (($?)) && continue ;
241+
status=$(GetStatus) ; (($?)) && return ;
242242

243243
n_behind=$(echo $status | tr " " "\n" | grep -c '^>')
244244
n_ahead=$( echo $status | tr " " "\n" | grep -c '^<')
245245
n_differences=$(($n_behind + $n_ahead))
246246
n_total_differences=$(($n_total_differences + $n_differences))
247247

248248
# filter branches by status
249-
(($SHOW_ALL_UPSTREAM)) || (($n_differences)) || continue
249+
(($SHOW_ALL_UPSTREAM)) || (($n_differences)) || return
250250

251251
# set data for branches with upstream
252252
local_color=$CDEFAULT
@@ -271,7 +271,7 @@ function GenerateReport # (a_local_branch_name a_remote_branch_name)
271271
behind_color="$CDEFAULT" ; behind_msg="n/a" ;
272272
ahead_color="$CDEFAULT" ; ahead_msg="n/a" ;
273273
remote_color=$CDEFAULT
274-
else continue
274+
else return
275275
fi
276276

277277
# populate lists

0 commit comments

Comments
 (0)