Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] vcs_info quilt: Avoid forks
- X-seq: zsh-workers 44958
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] vcs_info quilt: Avoid forks
- Date: Fri, 29 Nov 2019 20:52:00 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=from:to:subject:date:message-id; s=fm1; bh=DkH/p2QLhjz8BM16tGaGKOqSILNP1eRI57lkhxeSaZk=; b=MyRkg00+v2V4 Jvwi6xAN5zb1D/RUqAosBGSm+D4CJulmRM8w/pPZpQvNzhxb/ONFGTLfO1JeqtTM 1m5n+JDfDuIgN9k6RyZxe2o1Cb78vK/mnfvPCt2jq/WROf2pe7tnsGffo1/VMKsV 2v1Gh7EDXl2JZ3kPVjI7rDANXjzCmWne8D9Rcy+Wski8qfzI312dA9I5eotDYiWM kcsVZlEqe8GM8QnQOd8M/DF6XODLyssK+jyBKwA6HBm+9bpyPKARV9EqJbSnyqUv g1C/vflr/ry44js0djaRe/+4ZHNWJX4JoBgNavm81CcqJluY2kwUmYVy2izDMtLh hKCYdHCurA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=DkH/p2QLhjz8BM16tGaGKOqSILNP1eRI57lkhxeSaZk=; b=awhXUoaQ 8yoW8hxdOgRyfTxGgM8pcYtlbjnuzIS7qR4bv0j6bGj1c5LzkUwfVc05EUm//AOW 97swj0ZO0IXDWnW/XhixvQT3W0XJkQ01mcHBy2RMl43b+cbEL88K0oMvcMOKmd8k blOX15FEg/MjmXvyxYjvfdZY/COMdeLZakozASl1RZxiBjQ8ZBy8CoTQvtDY0WpZ mcMSjoKIY/qwIcYEU9uifxgWU/PyQBVRGjhxVyNYoBaPJUYxdwpWOfIo1TurexLN IJYpOaBxnnhFgFQ967kwTA4jz9HgcwsB1y6OnvLxDEZ1QVkH1/eqxaQOdD5BHdqH BfEFx+VSfUEZ0w==
- 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
---
I added an entry to the list of incompatibilities in README because the
function is defined as
.
(( ${+functions[VCS_INFO_quilt-dirfind]} )) ||
function VCS_INFO_quilt-dirfind() {
.
, presumably so zshrc can override it.
Cheers,
Daniel
Functions/VCS_Info/VCS_INFO_quilt | 10 +++++-----
README | 4 ++++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt
index 1f20e895d..fef85964a 100644
--- a/Functions/VCS_Info/VCS_INFO_quilt
+++ b/Functions/VCS_Info/VCS_INFO_quilt
@@ -78,7 +78,7 @@ function VCS_INFO_quilt-dirfind() {
VCS_INFO_bydir_detect ${dir}
ret=$?
vcs_comm[detect_need_file]=${oldfile}
- printf '%s' ${vcs_comm[basedir]}
+ REPLY=${vcs_comm[basedir]}
vcs_comm[basedir]="${olddir}"
return ${ret}
}
@@ -113,8 +113,8 @@ function VCS_INFO_quilt-patch2subject() {
;;
esac
- pc="$(VCS_INFO_quilt-dirfind .pc .version)"
- ret=$?
+ VCS_INFO_quilt-dirfind .pc .version
+ ret=$? pc=$REPLY
if (( ret == 0 )); then
[[ ${quiltmode} == 'standalone' ]] && root=${pc}
pc=${pc}/.pc
@@ -138,8 +138,8 @@ function VCS_INFO_quilt-patch2subject() {
zstyle -s "${context}" quilt-patch-dir patches || patches="${QUILT_PATCHES}"
if [[ "${patches}" != /* ]]; then
tmp=${patches:-patches}
- patches="$(VCS_INFO_quilt-dirfind "${tmp}")"
- ret=$?
+ VCS_INFO_quilt-dirfind "${tmp}"
+ ret=$? patches=$REPLY
(( ret )) && return ${ret}
patches=${patches}/${tmp}
else
diff --git a/README b/README
index be7929164..7ece48183 100644
--- a/README
+++ b/README
@@ -49,6 +49,10 @@ The behaviour of :h has similarly changed.
The behaviour has also changed in forms such as ${foo:t2) and *(:t2),
but in those cases the previous behaviour was not meaningful.
+The vcs_info function VCS_INFO_quilt-dirfind now returns a string value
+by setting $REPLY. Previously it printed the value to standard output.
+This only affects you if you override that function in your dotfiles.
+
Incompatibilities between 5.6.2 and 5.7.1
-----------------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author