diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-01-14 00:13:43 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2016-01-15 06:29:09 +0000 |
commit | ce1148db45b55b2977c72e4a4b78e51e709db022 (patch) | |
tree | 5f00d488c2d961cb4637453940ae5c777f3aaaa9 /Functions | |
parent | 06ea248034eeb6d540b1a29badbeb14bb590fb11 (diff) | |
download | zsh-ce1148db45b55b2977c72e4a4b78e51e709db022.tar.gz zsh-ce1148db45b55b2977c72e4a4b78e51e709db022.tar.xz zsh-ce1148db45b55b2977c72e4a4b78e51e709db022.zip |
37612: vcs_info git: Set $git_patches_unapplied correctly for 'rebase-apply' case.
This manifested, e.g., in 'git am' of a single patch that had a conflict.
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index e1cee7439..472c10d5d 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -247,7 +247,9 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then fi fi local last="$(< "${patchdir}/last")" - git_patches_unapplied=( {$cur..$last} ) + if (( cur+1 <= last )); then + git_patches_unapplied=( {$((cur+1))..$last} ) + fi fi VCS_INFO_git_handle_patches |