diff options
author | Aleksandr Mezin <mezin.alexander@gmail.com> | 2021-03-29 15:53:44 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2021-03-29 17:03:40 +0000 |
commit | fc82e8193bad79db5de9e40ec99814fe401ad876 (patch) | |
tree | 5b4a8c7992a255e6cca8bfd6060a01e2830d533b /Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs | |
parent | 2ffd2928336154cf38ee390db835f25c685fe713 (diff) | |
download | zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.gz zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.tar.xz zsh-fc82e8193bad79db5de9e40ec99814fe401ad876.zip |
47561 (the git and cvs parts) (compare 44919 + 44920): vcs_info internals: cvs, git: Set ${vcs_comm[basedir]} like all other backends do.
That doesn't affect anything, not even other vcs_info internals; it's just for consistency across backends.
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs b/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs index 9b828bd11..bc0d5cfe5 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs @@ -5,17 +5,8 @@ setopt localoptions NO_shwordsplit local cvsbranch cvsbase -# Look for the most distant parent that still has a CVS subdirectory. +cvsbase="${vcs_comm[basedir]}" # VCS_INFO_detect_cvs ensured that ./CVS/Repository exists. -cvsbase="." -cvsbase=${cvsbase:P} -while [[ -d "${cvsbase:h}/CVS" ]]; do - cvsbase="${cvsbase:h}" - if [[ $cvsbase == '/' ]]; then - break - fi -done - cvsbranch=$(< ./CVS/Repository) rrn=${cvsbase:t} cvsbranch=${cvsbranch##${rrn}/} |