Home Explore Blog CI



git

6th chunk of `Documentation/git-cvsserver.adoc`
c124bc58307926cf13048da13439cc6a2441ede6fce01afa0000000100000c55
 or branches at
all.  (Non-main-branch CVS revision numbers superficially resemble CVS
revision numbers, but they actually encode a git commit ID directly,
rather than represent the number of revisions since the branch point.)

Note that there are two ways to checkout a particular branch.
As described elsewhere on this page, the "module" parameter
of cvs checkout is interpreted as a branch name, and it becomes
the main branch.  It remains the main branch for a given sandbox
even if you temporarily make another branch sticky with
cvs update -r.  Alternatively, the -r argument can indicate
some other branch to actually checkout, even though the module
is still the "main" branch.  Tradeoffs (as currently
implemented): Each new "module" creates a new database on disk with
a history for the given module, and after the database is created,
operations against that main branch are fast.  Or alternatively,
-r doesn't take any extra disk space, but may be significantly slower for
many operations, like cvs update.

If you want to refer to a git refspec that has characters that are
not allowed by CVS, you have two options.  First, it may just work
to supply the git refspec directly to the appropriate CVS -r argument;
some CVS clients don't seem to do much sanity checking of the argument.
Second, if that fails, you can use a special character escape mechanism
that only uses characters that are valid in CVS tags.  A sequence
of 4 or 5 characters of the form (underscore (`"_"`), dash (`"-"`),
one or two characters, and dash (`"-"`)) can encode various characters based
on the one or two letters: `"s"` for slash (`"/"`), `"p"` for
period (`"."`), `"u"` for underscore (`"_"`), or two hexadecimal digits
for any byte value at all (typically an ASCII number, or perhaps a part
of a UTF-8 encoded character).

Legacy monitoring operations are not supported (edit, watch and related).
Exports and tagging (tags and branches) are not supported at this stage.

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 end-of-line conversion on some platforms.

You can make the server use the end-of-line conversion attributes to
set the `-k` modes for files by setting the `gitcvs.usecrlfattr`
config variable.  See linkgit:gitattributes[5] for more information
about end-of-line conversion.

Alternatively, if `gitcvs.usecrlfattr` config is not enabled
or the attributes do not allow automatic detection 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
------------
'git-cvsserver' depends on DBD::SQLite.

GIT
---
Part of the linkgit:git[1] suite

Title: Git CVS Server Configuration and Limitations
Summary
The Git CVS server has limitations on branch emulation, revision numbers, and character support, but offers workarounds such as character escape mechanisms and configuration options for line ending conversions, and depends on DBD::SQLite, with recommendations for setting config variables for consistency with 'cvs' behavior.