Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 5/9] vcs_info quilt: fix standalone detection



On Sun, 14 Sep 2014 11:42:55 +0200
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:

> Marc Finet wrote:
> [...]
> > -    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}
> 
> I don't think this changes anything really, but the removing the
> conditionals makes the code a bit easier to read. So ACK.
I can't remember on which case i fell on this case but
vcs_comm[detect_need_file] was set (and not cleared) by a previous call
hence finally not detecting quilt correctly. While reading at the patch
once more, it might not have interfered with quilt but by an other
backend that set vcs_comm[detect_need_file].

Marc.



Messages sorted by: Reverse Date, Date, Thread, Author