diff options
| author | Marc Finet <m.dreadlock@gmail.com> | 2014-09-12 23:30:39 +0200 |
|---|---|---|
| committer | Frank Terbeck <ft@bewatermyfriend.org> | 2014-09-14 12:02:36 +0200 |
| commit | 06e03e72345f06ca38e331099f6290a4e0e07891 (patch) | |
| tree | dd8064c8679282f375ab711346211dd312d07498 /Functions/VCS_Info | |
| parent | 33147: vcs_info git: detect revert or cherry-pick with multiple commits (diff) | |
| download | zsh-06e03e72345f06ca38e331099f6290a4e0e07891.tar zsh-06e03e72345f06ca38e331099f6290a4e0e07891.tar.gz zsh-06e03e72345f06ca38e331099f6290a4e0e07891.tar.bz2 zsh-06e03e72345f06ca38e331099f6290a4e0e07891.tar.lz zsh-06e03e72345f06ca38e331099f6290a4e0e07891.tar.xz zsh-06e03e72345f06ca38e331099f6290a4e0e07891.tar.zst zsh-06e03e72345f06ca38e331099f6290a4e0e07891.zip | |
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.
Diffstat (limited to 'Functions/VCS_Info')
| -rw-r--r-- | Functions/VCS_Info/VCS_INFO_quilt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_quilt b/Functions/VCS_Info/VCS_INFO_quilt index 7001eca07..db15dda74 100644 --- a/Functions/VCS_Info/VCS_INFO_quilt +++ b/Functions/VCS_Info/VCS_INFO_quilt @@ -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} |
