@matheusbsbs / matheus-bagliano / commits / 2c2d02a6a7
Fork 0

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 <scc@ScottCollins.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Scott Collins committed Apr 15, 2008 at 17:44 UTC 2c2d02a6a72ce690df9dafea5e76bd4395d16927
1 file changed +17 -11
Documentation/git-cvsserver.txt
+17 -11
@@ -110,7 +110,9 @@ cvs -d ":ext;CVS_SERVER=git-cvsserver:user@server/path/repo.git" co <HEAD_name>
110 ------
111 This has the advantage that it will be saved in your 'CVS/Root' files and
112 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.
116 --
117 2. For each repo that you want accessible from CVS you need to edit config in
118 the repo and add the following section.
@@ -141,25 +143,29 @@ allowing access over SSH.
143 enabled=1
144 ------
145 --
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.
151 +
152 --
149 -For SSH access, CVS_SERVER should be set to git-cvsserver
150 -
151 -Example:
152 -
153 ------
154 export CVSROOT=:ext:user@server:/var/git/project.git
155 export CVS_SERVER=git-cvsserver
156 ------
157 --
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.
163
164 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:
169 +
170 ------
171 cvs co -d project-master master