Skip to content

Commit

Permalink
Fix patterns for $(git branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshi committed Apr 1, 2011
1 parent 0bde515 commit 89b6561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/manage
Original file line number Diff line number Diff line change
Expand Up @@ -1418,12 +1418,12 @@ __rvm_fetch_ruby()
branches="$(git branch)" # Grab a list of the local branches

case "$branches" in
([[=*=]][[:space:]]${rvm_ruby_repo_branch})
(*\*[[:space:]]${rvm_ruby_repo_branch}*)
# On desired branch, pull!
git pull "$remote" "${rvm_ruby_repo_branch}"
;;

(*([[:space:]])${rvm_ruby_repo_branch})
(*[[:space:]]${rvm_ruby_repo_branch}*)
# Not already on the desired branch, but it does exist locally.
git checkout "${rvm_ruby_repo_branch}" # Branch is local, checkout
git pull "$remote" "${rvm_ruby_repo_branch}" # Bring local to latest
Expand Down

0 comments on commit 89b6561

Please sign in to comment.