1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

33148: vcs_info quilt: refactor standalone detection

Since VCS_INFO_bydir_detect always uses the
vcs_comm[detect_need_file], it should be cleared when querying
it without file.
This commit is contained in:
Marc Finet 2014-09-12 23:30:39 +02:00 committed by Frank Terbeck
parent 5e40996891
commit 06e03e7234
2 changed files with 6 additions and 5 deletions

View file

@ -8,6 +8,9 @@
* 33147: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
vcs_info git: detect revert or cherry-pick with multiple commits
* 33148: Functions/VCS_Info/VCS_INFO_quilt: vcs_info quilt:
refactor standalone detection
2014-09-12 Barton E. Schaefer <schaefer@zsh.org>
* 33143: Src/init.c: POSIX_ARGZERO more closely matches bash et al.

View file

@ -70,13 +70,11 @@ function VCS_INFO_quilt-dirfind() {
olddir=${vcs_comm[basedir]}
vcs_comm[basedir]=''
if [[ -n "${file}" ]]; then
oldfile=${vcs_comm[detect_need_file]}
vcs_comm[detect_need_file]=${file}
fi
oldfile=${vcs_comm[detect_need_file]}
vcs_comm[detect_need_file]=${file}
VCS_INFO_bydir_detect ${dir}
ret=$?
[[ -n "${file}" ]] && vcs_comm[detect_need_file]=${oldfile}
vcs_comm[detect_need_file]=${oldfile}
printf '%s' ${vcs_comm[basedir]}
vcs_comm[basedir]="${olddir}"
return ${ret}