mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 17:31:02 +01: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:
parent
5e40996891
commit
06e03e7234
2 changed files with 6 additions and 5 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue