mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Revert "fix: gcb can switch to an existed branch"
This reverts commit 8107352941.
This commit is contained in:
parent
bb55cf3f0a
commit
05ab1c5864
|
|
@ -217,7 +217,7 @@ function forgit::checkout::branch -d "git checkout branch selector" --argument-n
|
|||
forgit::inside_work_tree || return 1
|
||||
|
||||
if test -n "$input_branch_name"
|
||||
git checkout -B "$input_branch_name"
|
||||
git checkout -b "$input_branch_name"
|
||||
set checkout_status $status
|
||||
git status --short
|
||||
return $checkout_status
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ forgit::checkout::file() {
|
|||
# git checkout-branch selector
|
||||
forgit::checkout::branch() {
|
||||
forgit::inside_work_tree || return 1
|
||||
[[ $# -ne 0 ]] && { git checkout -B "$@"; return $?; }
|
||||
[[ $# -ne 0 ]] && { git checkout -b "$@"; return $?; }
|
||||
local cmd preview opts branch
|
||||
cmd="git branch --color=always --verbose --all | sort -k1.1,1.1 -r"
|
||||
preview="git log {1} --graph --pretty=format:'$forgit_log_format' --color=always --abbrev-commit --date=relative"
|
||||
|
|
|
|||
Loading…
Reference in a new issue