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

Re: [PATCH 2/3] vcs_info/cvs: set vcs_comm[basedir] in VCS_INFO_detect_cvs



On Mon, Nov 25, 2019 at 10:35 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Aleksandr Mezin wrote on Sun, Nov 24, 2019 at 04:14:42 +0600:
> > +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs
> > @@ -5,11 +5,7 @@
> > -cvsbase="."
> > -while [[ -d "${cvsbase}/../CVS" ]]; do
> > -    cvsbase="${cvsbase}/.."
> > -done
> > +++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_cvs
> > @@ -7,5 +7,12 @@ setopt localoptions NO_shwordsplit
> > +local cvsbase="."
> > +while [[ -d "${cvsbase}/../CVS" ]]; do
> > +    cvsbase="${cvsbase}/.."
> > +done
>
> I know you just moved this code around, but I'd like to point out that it
> causes an infinite loop when /CVS exists.

Also I probably shouldn't have moved the code in the first place. If
the current directory has `CVS/Repository` in it, it means that the
directory is controlled by CVS, and maybe we shouldn't consider .git
from the parent directory (even when the parent directory also has
`CVS/Repository` in it). Though it's questionable.

Example:
~/cvs-dir/CVS/Repository
~/cvs-dir/git-repo/.git
~/cvs-dir/git-repo/CVS/Repository
~/cvs-dir/git-repo/cvs-subdir/CVS/Repository

I'm not sure what vcs_info should output for ~/cvs-dir/git-repo/cvs-subdir/

>
> Cheers,
>
> Daniel



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