diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2019-11-29 20:52:00 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2019-11-29 20:57:01 +0000 |
commit | 98f8a8a980872f5d8f2a2a277e50a504d74a3f37 (patch) | |
tree | 04ff72e7c3694fd126f4b88f72b72160c321846f /Functions/VCS_Info | |
parent | cc3983ee586dff16638bdcdea40c784a54026571 (diff) | |
download | zsh-98f8a8a980872f5d8f2a2a277e50a504d74a3f37.tar.gz zsh-98f8a8a980872f5d8f2a2a277e50a504d74a3f37.tar.xz zsh-98f8a8a980872f5d8f2a2a277e50a504d74a3f37.zip |
44958: vcs_info quilt: Avoid forks
Diffstat (limited to 'Functions/VCS_Info')
-rw-r--r-- | Functions/VCS_Info/VCS_INFO_quilt | 10 |
1 files changed, 5 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 |