Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 4/4] vcs_info git: Reverse the order patches are passed to gen-unapplied-string in.
- X-seq: zsh-workers 43620
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 4/4] vcs_info git: Reverse the order patches are passed to gen-unapplied-string in.
- Date: Sun, 7 Oct 2018 17:46:43 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=from:to:subject:date:message-id :in-reply-to:references; s=fm1; bh=+bHR8iph96PdI4ZKBrcNdAOJnbs8a 3NoJ31bpy9i5oI=; b=Qi7tIMIhEUeRvvJnDM2JL+EXOmvdyxHkt4uSqPox8jxDR uCNWWq/CfyuVt5XciiKjtBBbmoK4EcQ3IaN5NdZULuqmZMubszLkTa1yec4mconW i2qL/giP2rwzFrKanw0mQ4/pE0i5DBCTuRQYa5W7wLSk4R8IBJuw9a1C3IVuxIS+ eII3mCbWRA6LZZiSQER3UhUAblRUBCgGLpR4rMbB9LgqQ/YD6uggtHj1ewFYP1vh obt1Qgy968zduJEs2ZlfD+jqfSgNSriJCpuPwd4PNe4h7+8Dq7/tNDJqbm7uh+4q dskNd3kOEl6E4NR2tgZYsWSmjKmMw6QOiGKPzKHLA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=+bHR8iph96PdI4ZKBrcNdAOJnbs8a 3NoJ31bpy9i5oI=; b=gvXRB0alzunxZMe8G4CQltjW7UMn8tj6k/XJHJMjDGtqo ykCok0q3Ke/Jq9tInEOT2CxIaJJrG8xVg0lltr/oIYMnn/uTGuwCp0lihF3zMWz/ AqgSutojOiButZxgtyjAMgqAPkP2J/XtquNamVwiw45URKEm2miwx5+B2EffjQwb 0RL4hFKIFmFa/IwNEJokwWjD0ml+kbFf7bbpLJpt8ID2vxpmKfhKu+QvHKCxjNh2 6uhSGjfXw4jFA6/S3p3K2RzKa0+lwwvROYnAWg4+yBtqYN2WKQHd8QrxkQtVyJT6 bFQJ9soD0NoyS1TA7HijmMQdy389rWp1L8SMPY05Q==
- In-reply-to: <20181007174643.16262-1-danielsh@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20181007174643.16262-1-danielsh@tarpaulin.shahaf.local2>
This is an incompatible change; see README for details.
---
Doc/Zsh/contrib.yo | 2 +-
Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 4 +++-
Functions/VCS_Info/VCS_INFO_set-patch-format | 2 ++
README | 9 ++++++++-
4 files changed, 14 insertions(+), 3 deletions(-)
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..a5cd5d861 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -123,8 +123,10 @@ 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})
+ typeset -p1 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..bff59a468 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,13 @@ 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
+-----------------------------
+
+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).
+
Incompatibilities since 5.5.1
-----------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author