From 06e03e72345f06ca38e331099f6290a4e0e07891 Mon Sep 17 00:00:00 2001 From: Marc Finet Date: Fri, 12 Sep 2014 23:30:39 +0200 Subject: 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. --- ChangeLog | 3 +++ Functions/VCS_Info/VCS_INFO_quilt | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00896da50..ec6557e1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * 33143: Src/init.c: POSIX_ARGZERO more closely matches bash et al. 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} -- cgit v1.2.3-70-g09d2