mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Preserve +/- information on cherry pick
The output of 'git cherry' which is used to build the fzf input list for forgit::cherry::pick usually prefixes every line with a '-' for commits that have an equivalent in the target branch, and a '+' for commits that do not. Previously forgit removed this information from the list. However, for the actual cherry-picking process this information is relevant, so we should keep it.
This commit is contained in:
parent
52d79009d1
commit
1b7db0fb6e
|
|
@ -344,8 +344,8 @@ function forgit::cherry::pick -d "git cherry-picking" --argument-names 'target'
|
|||
"
|
||||
echo $base
|
||||
echo $target
|
||||
git cherry "$base" "$target" --abbrev -v | cut -d ' ' -f2- |
|
||||
env FZF_DEFAULT_OPTS="$opts" fzf | cut -d' ' -f1 |
|
||||
git cherry "$base" "$target" --abbrev -v |
|
||||
env FZF_DEFAULT_OPTS="$opts" fzf | cut -d' ' -f2 |
|
||||
xargs -I% git cherry-pick %
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -159,8 +159,8 @@ forgit::cherry::pick() {
|
|||
-m -0 --tiebreak=index
|
||||
$FORGIT_CHERRY_PICK_FZF_OPTS
|
||||
"
|
||||
git cherry "$base" "$target" --abbrev -v | cut -d ' ' -f2- |
|
||||
FZF_DEFAULT_OPTS="$opts" fzf | cut -d' ' -f1 |
|
||||
git cherry "$base" "$target" --abbrev -v |
|
||||
FZF_DEFAULT_OPTS="$opts" fzf | cut -d' ' -f2 |
|
||||
xargs -I% git cherry-pick %
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue