about summary refs log tree commit diff
path: root/Functions/VCS_Info/Backends/VCS_INFO_get_data_cvs
blob: bc0d5cfe5ba399d6ea2da990c11f44630e0f0cc4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## vim:ft=zsh
## cvs support by: Frank Terbeck <ft@bewatermyfriend.org>
## Distributed under the same BSD-ish license as zsh itself.

setopt localoptions NO_shwordsplit
local cvsbranch cvsbase

cvsbase="${vcs_comm[basedir]}"
# VCS_INFO_detect_cvs ensured that ./CVS/Repository exists.
cvsbranch=$(< ./CVS/Repository)
rrn=${cvsbase:t}
cvsbranch=${cvsbranch##${rrn}/}
[[ -z ${cvsbranch} ]] && cvsbranch=${rrn}
VCS_INFO_formats '' "${cvsbranch}" "${cvsbase}" '' '' '' ''
return 0