Merge pull request #196 from pablombg/fix-checkout-branch

Fix gcb problems with verbosity and collation
This commit is contained in:
Wenxuan 2022-05-10 09:45:04 +08:00 committed by GitHub
commit 6186ee7e47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -257,7 +257,7 @@ function forgit::checkout::branch -d "git checkout branch selector" --argument-n
$FORGIT_CHECKOUT_BRANCH_FZF_OPTS
"
set cmd "git branch --color=always --verbose --all | sort -k1.1,1.1 -r"
set cmd "git branch --color=always --all | LC_ALL=C sort -k1.1,1.1 -rs"
set branch (eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf | awk '{print $1}')
test -z "$branch" && return 1

View file

@ -235,7 +235,7 @@ forgit::checkout::branch() {
forgit::inside_work_tree || return 1
[[ $# -ne 0 ]] && { git checkout -b "$@"; return $?; }
local cmd preview opts branch
cmd="git branch --color=always --verbose --all | sort -k1.1,1.1 -r"
cmd="git branch --color=always --all | LC_ALL=C sort -k1.1,1.1 -rs"
preview="git log {1} --graph --pretty=format:'$forgit_log_format' --color=always --abbrev-commit --date=relative"
opts="
$FORGIT_FZF_DEFAULT_OPTS