mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 15:26:16 -04:00
Fix cherry pick preview (#218)
The preview on cherry pick was accidentally broken since we included the +/- information in the commit list. Fix this by using the correct string index.
This commit is contained in:
parent
d2c2848037
commit
fdd5632b17
|
|
@ -340,7 +340,7 @@ function forgit::cherry::pick -d "git cherry-picking" --argument-names 'target'
|
|||
echo "Please specify target branch"
|
||||
return 1
|
||||
end
|
||||
set preview "echo {1} | xargs -I% git show --color=always % | $forgit_show_pager"
|
||||
set preview "echo {2} | xargs -I% git show --color=always % | $forgit_show_pager"
|
||||
set opts "
|
||||
--preview=\"$preview\"
|
||||
$FORGIT_FZF_DEFAULT_OPTS
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ forgit::cherry::pick() {
|
|||
base=$(git branch --show-current)
|
||||
[[ -z $1 ]] && echo "Please specify target branch" && return 1
|
||||
target="$1"
|
||||
preview="echo {1} | xargs -I% git show --color=always % | $forgit_show_pager"
|
||||
preview="echo {2} | xargs -I% git show --color=always % | $forgit_show_pager"
|
||||
opts="
|
||||
$FORGIT_FZF_DEFAULT_OPTS
|
||||
--preview=\"$preview\"
|
||||
|
|
|
|||
Loading…
Reference in a new issue