summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Doc/Zsh/contrib.yo2
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_git3
-rw-r--r--Functions/VCS_Info/VCS_INFO_set-patch-format2
-rw-r--r--README16
5 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cd79613f3..c2f645bcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-10-08  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 43620 (tweaked): Doc/Zsh/contrib.yo,
+	Functions/VCS_Info/Backends/VCS_INFO_get_data_git,
+	Functions/VCS_Info/VCS_INFO_set-patch-format, README: vcs_info
+	git: Reverse the order patches are passed to gen-unapplied-string
+	in.
+
 	* 43617: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
 	vcs_info git: During a non-interactive rebase of a detached head,
 	computer the %b expando correctly.
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 9e4e6bc8f..d32ba018d 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -1668,7 +1668,7 @@ tt(mq)) backend and in tt(quilt) support when the tt(unapplied-string) is
 generated; the tt(get-unapplied) style must be true.
 
 This hook gets the names of all unapplied patches which tt(vcs_info)
-collected so far in the opposite order, which means that the first argument is
+collected so far in order, which means that the first argument is
 the patch next-in-line to be applied and so forth.
 
 When setting tt(ret) to non-zero, the string in
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 8305cf41a..7ae2c0b27 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -123,8 +123,9 @@ VCS_INFO_git_getbranch () {
 (( ${+functions[VCS_INFO_git_handle_patches]} )) ||
 VCS_INFO_git_handle_patches () {
     local git_applied_s git_unapplied_s gitmsg
+    # All callers populate $git_patches_applied and $git_patches_unapplied in
+    # order, but the hook requires us to reverse $git_patches_applied.
     git_patches_applied=(${(Oa)git_patches_applied})
-    git_patches_unapplied=(${(Oa)git_patches_unapplied})
 
     VCS_INFO_set-patch-format 'git_patches_applied' 'git_applied_s' \
                               'git_patches_unapplied' 'git_unapplied_s' \
diff --git a/Functions/VCS_Info/VCS_INFO_set-patch-format b/Functions/VCS_Info/VCS_INFO_set-patch-format
index cdf2d303e..917ebf6bf 100644
--- a/Functions/VCS_Info/VCS_INFO_set-patch-format
+++ b/Functions/VCS_Info/VCS_INFO_set-patch-format
@@ -3,8 +3,10 @@
 #
 # Parameters:
 # $1 - name of an array parameter to be the argument to gen-applied-string
+#      (patches in reverse order)
 # $2 - name of a parameter to store the applied-string in
 # $3 - name of an array parameter to be the argument to gen-unapplied-string
+#      (patches in order)
 # $4 - name of a parameter to store the unapplied-string in
 # $5 - context argument for use in zstyle getters
 # $6 - name of a parameter to store a patch-format format string in
diff --git a/README b/README
index c792d4075..1583002a7 100644
--- a/README
+++ b/README
@@ -10,7 +10,7 @@ This is version 5.6.2 of the shell.  This is a bugfix release, following
 release.
 
 Note in particular the changes highlighted under "Incompatibilities since
-5.5.1" below.  See NEWS for more information.
+5.6.2" below.  See NEWS for more information.
 
 Installing Zsh
 --------------
@@ -31,6 +31,20 @@ Zsh is a shell with lots of features.  For a list of some of these, see the
 file FEATURES, and for the latest changes see NEWS.  For more
 details, see the documentation.
 
+Incompatibilities since 5.6.2
+-----------------------------
+
+1) vcs_info git: The gen-unapplied-string hook receives the patches in order (next
+to be applied first).  This is consistent with the hg backend and with one of
+two contradictory claims in the documentation (the other one has been corrected).
+In zsh through 5.6.2, the patches were passed in reverse order, next to be
+applied being last in the array.
+
+The gen-applied-string hook is unaffected; it still receives the patches in
+reverse order, from last applied to first applied.
+
+2) 
+
 Incompatibilities since 5.5.1
 -----------------------------