Skip to content

Commit

Permalink
Merge branch 'mo/cvsserver'
Browse files Browse the repository at this point in the history
* mo/cvsserver:
  Documentation: Fix skipped section level
  git-cvsserver: add ability to guess -kb from contents
  implement gitcvs.usecrlfattr
  git-cvsserver: add mechanism for managing working tree and current directory
  • Loading branch information
Junio C Hamano committed May 25, 2008
2 parents 6a491a1 + b592d88 commit 58dd491
Show file tree
Hide file tree
Showing 4 changed files with 826 additions and 69 deletions.
26 changes: 20 additions & 6 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,24 @@ gitcvs.logfile::
Path to a log file where the CVS server interface well... logs
various stuff. See linkgit:git-cvsserver[1].

gitcvs.usecrlfattr
If true, the server will look up the `crlf` attribute for
files to determine the '-k' modes to use. If `crlf` is set,
the '-k' mode will be left blank, so cvs clients will
treat it as text. If `crlf` is explicitly unset, the file
will be set with '-kb' mode, which supresses any newline munging
the client might otherwise do. If `crlf` is not specified,
then 'gitcvs.allbinary' is used. See linkgit:gitattribute[5].

gitcvs.allbinary::
If true, all files are sent to the client in mode '-kb'. This
causes the client to treat all files as binary files which suppresses
any newline munging it otherwise might do. A work-around for the
fact that there is no way yet to set single files to mode '-kb'.
This is used if 'gitcvs.usecrlfattr' does not resolve
the correct '-kb' mode to use. If true, all
unresolved files are sent to the client in
mode '-kb'. This causes the client to treat them
as binary files, which suppresses any newline munging it
otherwise might do. Alternatively, if it is set to "guess",
then the contents of the file are examined to decide if
it is binary, similar to 'core.autocrlf'.

gitcvs.dbname::
Database used by git-cvsserver to cache revision information
Expand Down Expand Up @@ -697,8 +710,9 @@ gitcvs.dbTableNamePrefix::
linkgit:git-cvsserver[1] for details). Any non-alphabetic
characters will be replaced with underscores.

All gitcvs variables except for 'gitcvs.allbinary' can also be
specified as 'gitcvs.<access_method>.<varname>' (where 'access_method'
All gitcvs variables except for 'gitcvs.usecrlfattr' and
'gitcvs.allbinary' can also be specified as
'gitcvs.<access_method>.<varname>' (where 'access_method'
is one of "ext" and "pserver") to make them apply only for the given
access method.

Expand Down
32 changes: 27 additions & 5 deletions Documentation/git-cvsserver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,33 @@ checkout, diff, status, update, log, add, remove, commit.
Legacy monitoring operations are not supported (edit, watch and related).
Exports and tagging (tags and branches) are not supported at this stage.

The server should set the '-k' mode to binary when relevant, however,
this is not really implemented yet. For now, you can force the server
to set '-kb' for all files by setting the `gitcvs.allbinary` config
variable. In proper GIT tradition, the contents of the files are
always respected. No keyword expansion or newline munging is supported.
CRLF Line Ending Conversions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default the server leaves the '-k' mode blank for all files,
which causes the cvs client to treat them as a text files, subject
to crlf conversion on some platforms.

You can make the server use `crlf` attributes to set the '-k' modes
for files by setting the `gitcvs.usecrlfattr` config variable.
In this case, if `crlf` is explicitly unset ('-crlf'), then the
server will set '-kb' mode for binary files. If `crlf` is set,
then the '-k' mode will explicitly be left blank. See
also linkgit:gitattributes[5] for more information about the `crlf`
attribute.

Alternatively, if `gitcvs.usecrlfattr` config is not enabled
or if the `crlf` attribute is unspecified for a filename, then
the server uses the `gitcvs.allbinary` config for the default setting.
If `gitcvs.allbinary` is set, then file not otherwise
specified will default to '-kb' mode. Otherwise the '-k' mode
is left blank. But if `gitcvs.allbinary` is set to "guess", then
the correct '-k' mode will be guessed based on the contents of
the file.

For best consistency with cvs, it is probably best to override the
defaults by setting `gitcvs.usecrlfattr` to true,
and `gitcvs.allbinary` to "guess".

Dependencies
------------
Expand Down
Loading

0 comments on commit 58dd491

Please sign in to comment.