Use argument to create new branch on gcb

This commit is contained in:
Carlos de Paula 2021-03-08 20:07:54 -03:00 committed by Christopher Apple
parent 15383e6b4d
commit 3faab44f66

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"