File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -849,10 +849,10 @@ _forgit_checkout_branch() {
849849 [[ -z " $branch " ]] && return 1
850850
851851 # track the remote branch if possible
852- if [[ " $branch " == " remotes/origin/ " * ]]; then
853- if git branch | grep -qw " ${branch# remotes/ origin / } " ; then
852+ if [[ " $branch " == " remotes/" * ]]; then
853+ if git branch | grep -qw " ${branch# remotes/* / } " ; then
854854 # hack to force creating a new branch which tracks the remote if a local branch already exists
855- _forgit_git_checkout_branch -b " track/${branch# remotes/ origin / } " --track " $branch "
855+ _forgit_git_checkout_branch -b " track/${branch# remotes/* / } " --track " $branch "
856856 elif ! _forgit_git_checkout_branch --track " $branch " 2> /dev/null; then
857857 _forgit_git_checkout_branch " $branch "
858858 fi
You can’t perform that action at this time.
0 commit comments