From 0e0219118d2df43ee52d44ef5ca93354597d5508 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 7 Oct 2018 17:46:41 +0000 Subject: 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'. --- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'Functions') diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 0050f613a..cd57902b6 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -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 -- cgit 1.4.1