Skip to content

Commit 791f2bc

Browse files
committed
replace displaced 'continue's with 'return's
* remove stray "Lesser" from header
1 parent d896562 commit 791f2bc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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)