Merge pull request #140 from carlosedp/gcb-args

Use argument to create new branch on gcb
This commit is contained in:
Wenxuan 2021-03-10 21:33:41 +08:00 committed by GitHub
commit 12b8881573
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,6 +184,7 @@ forgit::rebase() {
forgit::checkout::branch() {
forgit::inside_work_tree || return 1
[[ $# -ne 0 ]] && { git checkout -b "$*"; return $?; }
local cmd preview opts
cmd="git branch --color=always --verbose --all --format=\"%(if:equals=HEAD)%(refname:strip=3)%(then)%(else)%(refname:short)%(end)\" $* $forgit_emojify | sed '/^$/d'"
preview="git log {} --graph --pretty=format:'%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' --color=always --abbrev-commit --date=relative"