diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2018-10-02 15:20:53 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2018-10-07 15:05:17 +0000 |
commit | 0c00eed4c77aee7af64e9272bfd1cddb8663e477 (patch) | |
tree | 295be723ec9f7fdc0b4c362b21adcd4b7d5ac490 /Functions/VCS_Info | |
parent | a27fad1ae2c87bdb4861005719fd7db86827344c (diff) | |
download | zsh-0c00eed4c77aee7af64e9272bfd1cddb8663e477.tar.gz zsh-0c00eed4c77aee7af64e9272bfd1cddb8663e477.tar.xz zsh-0c00eed4c77aee7af64e9272bfd1cddb8663e477.zip |
43588: vcs_info git: Make sure applied-patches is of the form "$hash $subject" --- that is, has a space and a non-empty second argument --- even with future 'git rebase -i' verbs.
Use of '?' is consistent with these precedents: Backends/VCS_INFO_get_data_git:220: printf -v "git_patches_applied[$p]" "%04d ?" "$p" Backends/VCS_INFO_get_data_git:242: git_patches_applied+=("? $subject") Backends/VCS_INFO_get_data_git:244: git_patches_applied+=("?") VCS_INFO_quilt:160: applied[$i]+=" ?" VCS_INFO_quilt:168: unapplied[$i]+=" ?"
Diffstat (limited to 'Functions/VCS_Info')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 892b4741f..087a8a283 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -203,6 +203,11 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then # "$hash $subject", but I hope this counts as making an effort. p=${p/x /exec } ;; + (*) + # Forward compatibility with not-yet-existing 'git rebase -i' verbs. + if [[ $p != *\ * ]]; then + p+=" ?" + fi esac git_patches_applied+=("$p") done |