summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git4
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cbbd36ff..f991b4e85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-15 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 37612: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
+ vcs_info git: Set $git_patches_unapplied correctly for
+ 'rebase-apply' case.
+
2016-01-14 Daniel Shahaf <d.s@daniel.shahaf.name>
* 37590: Src/Zle/zle_hist.c, Src/Zle/zle_main.c: Invoke
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