Skip to content

Commit 2c2d02a

Browse files
sccgitster
authored andcommitted
Clarify documentation of git-cvsserver, particularly in relation to git-shell
For SSH clients restricted to git-shell, CVS_SERVER does not have to be specified, because git-shell understands the default value of 'cvs' to mean git-cvsserver'. This makes it totally transparent to CVS users, but the instruction to set up CVS access for people with real shell access does not apply. Previous wording mentioning GIT_AUTHOR, GIT_COMMITTER variables was unclear that we really meant GIT_AUTHOR_(NAME|EMAIL), etc. Note that the .ssh/environment file is a good place to set these, and that the .bashrc is shell-specific. Add a bit of text to differentiate cvs -d (setting CVSROOT) from cvs co -d (setting the name of the newly checked out directory). Removed an extra 'Example:' string. Signed-off-by: Scott Collins <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e809507 commit 2c2d02a

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

Documentation/git-cvsserver.txt

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ cvs -d ":ext;CVS_SERVER=git-cvsserver:user@server/path/repo.git" co <HEAD_name>
110110
------
111111
This has the advantage that it will be saved in your 'CVS/Root' files and
112112
you don't need to worry about always setting the correct environment
113-
variable.
113+
variable. SSH users restricted to git-shell don't need to override the default
114+
with CVS_SERVER (and shouldn't) as git-shell understands `cvs` to mean
115+
git-cvsserver and pretends that the other end runs the real cvs better.
114116
--
115117
2. For each repo that you want accessible from CVS you need to edit config in
116118
the repo and add the following section.
@@ -141,25 +143,29 @@ allowing access over SSH.
141143
enabled=1
142144
------
143145
--
144-
3. On the client machine you need to set the following variables.
145-
CVSROOT should be set as per normal, but the directory should point at the
146-
appropriate git repo. For example:
146+
3. If you didn't specify the CVSROOT/CVS_SERVER directly in the checkout command,
147+
automatically saving it in your 'CVS/Root' files, then you need to set them
148+
explicitly in your environment. CVSROOT should be set as per normal, but the
149+
directory should point at the appropriate git repo. As above, for SSH clients
150+
_not_ restricted to git-shell, CVS_SERVER should be set to git-cvsserver.
147151
+
148152
--
149-
For SSH access, CVS_SERVER should be set to git-cvsserver
150-
151-
Example:
152-
153153
------
154154
export CVSROOT=:ext:user@server:/var/git/project.git
155155
export CVS_SERVER=git-cvsserver
156156
------
157157
--
158-
4. For SSH clients that will make commits, make sure their .bashrc file
159-
sets the GIT_AUTHOR and GIT_COMMITTER variables.
158+
4. For SSH clients that will make commits, make sure their server-side
159+
.ssh/environment files (or .bashrc, etc., according to their specific shell)
160+
export appropriate values for GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL,
161+
GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL. For SSH clients whose login
162+
shell is bash, .bashrc may be a reasonable alternative.
160163

161164
5. Clients should now be able to check out the project. Use the CVS 'module'
162-
name to indicate what GIT 'head' you want to check out. Example:
165+
name to indicate what GIT 'head' you want to check out. This also sets the
166+
name of your newly checked-out directory, unless you tell it otherwise with
167+
`-d <dir_name>`. For example, this checks out 'master' branch to the
168+
`project-master` directory:
163169
+
164170
------
165171
cvs co -d project-master master

0 commit comments

Comments
 (0)