git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] git-cvsserver: Add support for some binary files
@ 2008-05-15  4:35 Matthew Ogilvie
  2008-05-15  4:35 ` [PATCH 1/3] git-cvsserver: add mechanism for managing working tree and current directory Matthew Ogilvie
  2008-05-17  0:03 ` [PATCH 0/3] git-cvsserver: Add support for some binary files Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Matthew Ogilvie @ 2008-05-15  4:35 UTC (permalink / raw)
  To: git; +Cc: Matthew Ogilvie

This series of patches extends git-cvsserver to support telling the
CVS client to set the -kb (binary) mode for files that git considers
to be binary (and not for text files).  It includes updates to
documentation and tests.

By default the new binary support is not enabled.  To enable it,
you should set "gitcvs.usecrlfattr" and "gitcvs.allbinary=guess",
as described in the updated documentation.

-----------------

This patch series is usable now, but there are some things I'm not
sure about, and things that could still use improvement:

1. As currently implemented, the second patch (for checking file
attributes) forks a separate instance of git-check-attr for every
file it needs to look up in the repository.  Each invocation involves
reading the index file, so things may get kind of slow if
there are a whole lot of files in the repository.  It might be
worth reorganizing things so that it can ask about multiple
files in one invocation of git-check-attr, but such a change would
probably be invasive enough to warrant a separate patch.

2. Is there a better/more intuitive way of configuring this?  Perhaps
"gitcvs.autocrlf" that is similar to "core.autocrlf"?  But it seems
unfriendly to drop default and "gitcvs.allbinary" modes; some
users may have set things up such that those modes are needed.

3. I'm not sure about the best way to handle repeatably changing
current directory.  The first patch tries to make a somewhat general
mechanism to manage it, but I keep thinking in the back of my mind
that it might be better to set up a working directory first thing,
and then minimize any further directory changes after that.  Does
anyone have any thoughts about this?

4. Possibly additional enhancements including:
a. Strip out '\r' from "text" files, so when the CVS client
adds '\r', you don't wind up with double '\r's per line.
b. Additional conversions like in convert.c, done on server side.
Including safecrlf, smudge/clean filters, etc.
c. If a new .gitattributes file is sent by the client, use it
in preference over the one from the most recent commit.  As it
is now, a user might need to commit the new .gitattributes before
committing anything else.  This might be much easier if a new
overall design for setting up and using a working directory was
used (see above).

5. It might make things clearer to refactor the special case
transmitfile() modes to be implemented as separate functions that
use open_blob_or_die().  Probably a separate patch, if done at all.

6. Additional tweaks to the documentation?  For example, should
there be a note on "core.autocrlf" that binary support in emulation
tools may use other configuration variables...

Matthew Ogilvie (3):
      git-cvsserver: add mechanism for managing working tree and current directory
      implement gitcvs.usecrlfattr
      git-cvsserver: add ability to guess -kb from contents

 Documentation/config.txt        |   26 ++-
 Documentation/git-cvsserver.txt |   32 ++-
 git-cvsserver.perl              |  500 ++++++++++++++++++++++++++++++++++-----
 t/t9401-git-cvsserver-crlf.sh   |  337 ++++++++++++++++++++++++++
 4 files changed, 826 insertions(+), 69 deletions(-)
 create mode 100755 t/t9401-git-cvsserver-crlf.sh

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-20  3:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15  4:35 [PATCH 0/3] git-cvsserver: Add support for some binary files Matthew Ogilvie
2008-05-15  4:35 ` [PATCH 1/3] git-cvsserver: add mechanism for managing working tree and current directory Matthew Ogilvie
2008-05-15  4:35   ` [PATCH 2/3] implement gitcvs.usecrlfattr Matthew Ogilvie
2008-05-15  4:35     ` [PATCH 3/3] git-cvsserver: add ability to guess -kb from contents Matthew Ogilvie
2008-05-17  0:03 ` [PATCH 0/3] git-cvsserver: Add support for some binary files Junio C Hamano
2008-05-18 22:10   ` Matthew Ogilvie
2008-05-18 22:38   ` Martin Langhoff
2008-05-19  7:35     ` Matthew Ogilvie
2008-05-19  9:34       ` Johannes Schindelin
2008-05-20  3:05         ` Matthew Ogilvie
2008-05-19 10:53       ` Martin Langhoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).