1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

43619: vcs_info git: In non-interactive rebases, always set $hook_com[git_patches_applied] to a string of the form 'foo bar', never just 'foo'.

This commit is contained in:
Daniel Shahaf 2018-10-07 17:46:41 +00:00
parent a05533e425
commit 0e0219118d
2 changed files with 8 additions and 10 deletions

View file

@ -260,18 +260,11 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then
subject=$REPLY
}
fi
subject=${subject:-'?'}
if [[ -f "${patchdir}/original-commit" ]]; then
if [[ -n $subject ]]; then
git_patches_applied+=("$(< ${patchdir}/original-commit) $subject")
else
git_patches_applied+=("$(< ${patchdir}/original-commit)")
fi
git_patches_applied+=("$(< ${patchdir}/original-commit) $subject")
else
if [[ -n $subject ]]; then
git_patches_applied+=("? $subject")
else
git_patches_applied+=("?")
fi
git_patches_applied+=("? $subject")
fi
local last="$(< "${patchdir}/last")"
if (( cur+1 <= last )); then