mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Preserve commit order on cherry pick
When using a fzf find string which maches multiple lines, the commits could appear in a wrong order. Add "--tiebreak=index" to ensure that the correct commit order is preserved.
This commit is contained in:
parent
53d0ea2f38
commit
52d79009d1
|
|
@ -339,7 +339,7 @@ function forgit::cherry::pick -d "git cherry-picking" --argument-names 'target'
|
|||
set opts "
|
||||
--preview=\"$preview\"
|
||||
$FORGIT_FZF_DEFAULT_OPTS
|
||||
-m -0
|
||||
-m -0 --tiebreak=index
|
||||
$FORGIT_CHERRY_PICK_FZF_OPTS
|
||||
"
|
||||
echo $base
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ forgit::cherry::pick() {
|
|||
opts="
|
||||
$FORGIT_FZF_DEFAULT_OPTS
|
||||
--preview=\"$preview\"
|
||||
-m -0
|
||||
-m -0 --tiebreak=index
|
||||
$FORGIT_CHERRY_PICK_FZF_OPTS
|
||||
"
|
||||
git cherry "$base" "$target" --abbrev -v | cut -d ' ' -f2- |
|
||||
|
|
|
|||
Loading…
Reference in a new issue