From 8a06a632976ead891115ad9ac9dea7b99c52158e Mon Sep 17 00:00:00 2001 From: Matthew Ogilvie Date: Wed, 14 May 2008 22:35:47 -0600 Subject: implement gitcvs.usecrlfattr If gitcvs.usecrlfattr is set to true, git-cvsserver will consult the "crlf" for each file to determine if it should mark the file as binary (-kb). Signed-off-by: Matthew Ogilvie Signed-off-by: Junio C Hamano --- Documentation/config.txt | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'Documentation/config.txt') diff --git a/Documentation/config.txt b/Documentation/config.txt index 217980f48d..036e61e2f6 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -660,11 +660,21 @@ 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'. + If true, all files not otherwise specified using + 'gitcvs.usecrlfattr' and an explicitly set or unset `crlf` + attribute 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. gitcvs.dbname:: Database used by git-cvsserver to cache revision information @@ -695,8 +705,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..' (where 'access_method' +All gitcvs variables except for 'gitcvs.usecrlfattr' and +'gitcvs.allbinary' can also be specified as +'gitcvs..' (where 'access_method' is one of "ext" and "pserver") to make them apply only for the given access method. -- cgit v1.2.3 From 90948a42892779734f77d62f20326c868392fd8f Mon Sep 17 00:00:00 2001 From: Matthew Ogilvie Date: Wed, 14 May 2008 22:35:48 -0600 Subject: git-cvsserver: add ability to guess -kb from contents If "gitcvs.allbinary" is set to "guess", then any file that has not been explicitly marked as binary or text using the "crlf" attribute and the "gitcvs.usecrlfattr" config will guess binary based on the contents of the file. Signed-off-by: Matthew Ogilvie Signed-off-by: Junio C Hamano --- Documentation/config.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Documentation/config.txt') diff --git a/Documentation/config.txt b/Documentation/config.txt index 036e61e2f6..917ef5b4fe 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -670,11 +670,14 @@ gitcvs.usecrlfattr then 'gitcvs.allbinary' is used. See linkgit:gitattribute[5]. gitcvs.allbinary:: - If true, all files not otherwise specified using - 'gitcvs.usecrlfattr' and an explicitly set or unset `crlf` - attribute 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. + 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 -- cgit v1.2.3