Index: src/checkin.c ================================================================== --- src/checkin.c +++ src/checkin.c @@ -1701,16 +1701,16 @@ ** Issue a warning and give the user an opportunity to abandon out ** if a Unicode (UTF-16) byte-order-mark (BOM) or a \r\n line ending ** is seen in a text file. ** ** Return 1 if the user pressed 'c'. In that case, the file will have -** been converted to UTF-8 (if it was UTF-16) with NL line-endings, +** been converted to UTF-8 (if it was UTF-16) with LF line-endings, ** and the original file will have been renamed to "-original". */ static int commit_warning( Blob *pContent, /* The content of the file being committed. */ - int crnlOk, /* Non-zero if CR/NL warnings should be disabled. */ + int crlfOk, /* Non-zero if CR/LF warnings should be disabled. */ int binOk, /* Non-zero if binary warnings should be disabled. */ int encodingOk, /* Non-zero if encoding warnings should be disabled. */ int noPrompt, /* 0 to always prompt, 1 for 'N', 2 for 'Y'. */ const char *zFilename, /* The full name of the file being committed. */ Blob *pReason /* Reason for warning, if any (non-fatal only). */ @@ -1761,39 +1761,39 @@ zWarning = "binary data"; zConvert = ""; /* We cannot convert binary files. */ } zDisable = "\"binary-glob\" setting"; }else if( fUnicode && fHasAnyCr ){ - if( crnlOk && encodingOk ){ - return 0; /* We don't want CR/NL and Unicode warnings for this file. */ + if( crlfOk && encodingOk ){ + return 0; /* We don't want CR/LF and Unicode warnings for this file. */ } if( fHasLoneCrOnly ){ zWarning = "CR line endings and Unicode"; }else if( fHasCrLfOnly ){ - zWarning = "CR/NL line endings and Unicode"; + zWarning = "CR/LF line endings and Unicode"; }else{ zWarning = "mixed line endings and Unicode"; } - zDisable = "\"crnl-glob\" and \"encoding-glob\" settings"; + zDisable = "\"crlf-glob\" and \"encoding-glob\" settings"; }else if( fHasInvalidUtf8 ){ if( encodingOk ){ return 0; /* We don't want encoding warnings for this file. */ } zWarning = "invalid UTF-8"; zDisable = "\"encoding-glob\" setting"; }else if( fHasAnyCr ){ - if( crnlOk ){ - return 0; /* We don't want CR/NL warnings for this file. */ + if( crlfOk ){ + return 0; /* We don't want CR/LF warnings for this file. */ } if( fHasLoneCrOnly ){ zWarning = "CR line endings"; }else if( fHasCrLfOnly ){ - zWarning = "CR/NL line endings"; + zWarning = "CR/LF line endings"; }else{ zWarning = "mixed line endings"; } - zDisable = "\"crnl-glob\" setting"; + zDisable = "\"crlf-glob\" setting"; }else{ if( encodingOk ){ return 0; /* We don't want encoding warnings for this file. */ } zWarning = "Unicode"; @@ -1880,35 +1880,36 @@ db_must_be_within_tree(); db_prepare(&q, "SELECT %Q || pathname, pathname, %s, %s, %s FROM vfile" " WHERE NOT deleted", g.zLocalRoot, - glob_expr("pathname", noSettings ? 0 : db_get("crnl-glob","")), + glob_expr("pathname", noSettings ? 0 : db_get("crlf-glob", + db_get("crnl-glob",""))), glob_expr("pathname", noSettings ? 0 : db_get("binary-glob","")), glob_expr("pathname", noSettings ? 0 : db_get("encoding-glob","")) ); while( db_step(&q)==SQLITE_ROW ){ const char *zFullname; const char *zName; Blob content; Blob reason; - int crnlOk, binOk, encodingOk; + int crlfOk, binOk, encodingOk; int fileRc; zFullname = db_column_text(&q, 0); zName = db_column_text(&q, 1); - crnlOk = db_column_int(&q, 2); + crlfOk = db_column_int(&q, 2); binOk = db_column_int(&q, 3); encodingOk = db_column_int(&q, 4); blob_zero(&content); if( file_wd_islink(zFullname) ){ blob_read_link(&content, zFullname); }else{ blob_read_from_file(&content, zFullname); } blob_zero(&reason); - fileRc = commit_warning(&content, crnlOk, binOk, encodingOk, 2, + fileRc = commit_warning(&content, crlfOk, binOk, encodingOk, 2, zFullname, &reason); if( fileRc || verboseFlag ){ fossil_print("%d\t%s\t%s\n", fileRc, zName, blob_str(&reason)); } blob_reset(&reason); @@ -1964,11 +1965,11 @@ ** be older than its ancestor unless the --allow-older option appears. ** If any of files in the check-in appear to contain unresolved merge ** conflicts, the check-in will not be allowed unless the ** --allow-conflict option is present. In addition, the entire ** check-in process may be aborted if a file contains content that -** appears to be binary, Unicode text, or text with CR/NL line endings +** appears to be binary, Unicode text, or text with CR/LF line endings ** unless the interactive user chooses to proceed. If there is no ** interactive user or these warnings should be skipped for some other ** reason, the --no-warnings option may be used. A check-in is not ** allowed against a closed leaf. ** @@ -2338,24 +2339,24 @@ */ db_prepare(&q, "SELECT id, %Q || pathname, mrid, %s, %s, %s FROM vfile " "WHERE chnged==1 AND NOT deleted AND is_selected(id)", g.zLocalRoot, - glob_expr("pathname", db_get("crnl-glob","")), + glob_expr("pathname", db_get("crlf-glob",db_get("crnl-glob",""))), glob_expr("pathname", db_get("binary-glob","")), glob_expr("pathname", db_get("encoding-glob","")) ); while( db_step(&q)==SQLITE_ROW ){ int id, rid; const char *zFullname; Blob content; - int crnlOk, binOk, encodingOk; + int crlfOk, binOk, encodingOk; id = db_column_int(&q, 0); zFullname = db_column_text(&q, 1); rid = db_column_int(&q, 2); - crnlOk = db_column_int(&q, 3); + crlfOk = db_column_int(&q, 3); binOk = db_column_int(&q, 4); encodingOk = db_column_int(&q, 5); blob_zero(&content); if( file_wd_islink(zFullname) ){ @@ -2364,11 +2365,11 @@ }else{ blob_read_from_file(&content, zFullname); } /* Do not emit any warnings when they are disabled. */ if( !noWarningFlag ){ - abortCommit |= commit_warning(&content, crnlOk, binOk, + abortCommit |= commit_warning(&content, crlfOk, binOk, encodingOk, noPrompt, zFullname, 0); } if( contains_merge_marker(&content) ){ Blob fname; /* Relative pathname of the file */ Index: src/configure.c ================================================================== --- src/configure.c +++ src/configure.c @@ -121,10 +121,11 @@ { "manifest", CONFIGSET_PROJ }, { "binary-glob", CONFIGSET_PROJ }, { "clean-glob", CONFIGSET_PROJ }, { "ignore-glob", CONFIGSET_PROJ }, { "keep-glob", CONFIGSET_PROJ }, + { "crlf-glob", CONFIGSET_PROJ }, { "crnl-glob", CONFIGSET_PROJ }, { "encoding-glob", CONFIGSET_PROJ }, { "empty-dirs", CONFIGSET_PROJ }, { "allow-symlinks", CONFIGSET_PROJ }, { "dotfiles", CONFIGSET_PROJ }, Index: src/db.c ================================================================== --- src/db.c +++ src/db.c @@ -2733,10 +2733,11 @@ #else { "case-sensitive", 0, 0, 0, 0, "on" }, #endif { "clean-glob", 0, 40, 1, 0, "" }, { "clearsign", 0, 0, 0, 0, "off" }, + { "crlf-glob", 0, 40, 1, 0, "" }, { "crnl-glob", 0, 40, 1, 0, "" }, { "default-perms", 0, 16, 0, 0, "u" }, { "diff-binary", 0, 0, 0, 0, "on" }, { "diff-command", 0, 40, 0, 0, "" }, { "dont-push", 0, 0, 0, 0, "off" }, @@ -2890,13 +2891,14 @@ ** ** clearsign When enabled, fossil will attempt to sign all commits ** with gpg. When disabled (the default), commits will ** be unsigned. Default: off ** -** crnl-glob A comma or newline-separated list of GLOB patterns for -** (versionable) text files in which it is ok to have CR, CR+NL or mixed -** line endings. Set to "*" to disable CR+NL checking. +** crlf-glob A comma or newline-separated list of GLOB patterns for +** (versionable) text files in which it is ok to have CR, CR+LF or mixed +** line endings. Set to "*" to disable CR+LF checking. +** The crnl-glob setting is a compatibility alias. ** ** default-perms Permissions given automatically to new users. For more ** information on permissions see Users page in Server ** Administration of the HTTP UI. Default: u. ** Index: src/json_config.c ================================================================== --- src/json_config.c +++ src/json_config.c @@ -77,10 +77,11 @@ { "manifest", CONFIGSET_PROJ }, { "binary-glob", CONFIGSET_PROJ }, { "clean-glob", CONFIGSET_PROJ }, { "ignore-glob", CONFIGSET_PROJ }, { "keep-glob", CONFIGSET_PROJ }, +{ "crlf-glob", CONFIGSET_PROJ }, { "crnl-glob", CONFIGSET_PROJ }, { "encoding-glob", CONFIGSET_PROJ }, { "empty-dirs", CONFIGSET_PROJ }, { "allow-symlinks", CONFIGSET_PROJ }, { "dotfiles", CONFIGSET_PROJ }, Index: src/printf.c ================================================================== --- src/printf.c +++ src/printf.c @@ -1139,11 +1139,11 @@ } free(z); } /* -** Turn off any NL to CRNL translation on the stream given as an +** Turn off any LF to CRLF translation on the stream given as an ** argument. This is a no-op on unix but is necessary on windows. */ void fossil_binary_mode(FILE *p){ #if defined(_WIN32) _setmode(_fileno(p), _O_BINARY); Index: src/report.c ================================================================== --- src/report.c +++ src/report.c @@ -129,12 +129,12 @@ return ""; } /* ** Remove blank lines from the beginning of a string and -** all whitespace from the end. Removes whitespace preceding a NL, -** which also converts any CRNL sequence into a single NL. +** all whitespace from the end. Removes whitespace preceding a LF, +** which also converts any CRLF sequence into a single LF. */ char *remove_blank_lines(const char *zOrig){ int i, j, n; char *z; for(i=j=0; fossil_isspace(zOrig[i]); i++){ if( zOrig[i]=='\n' ) j = i+1; } Index: www/settings.wiki ================================================================== --- www/settings.wiki +++ www/settings.wiki @@ -33,15 +33,15 @@ use Fossil, how you communicate with the server, or options for hosting a repository on the web. However, for historical reasons, some settings affect how you work with versioned files. These are allow-symlinks, -binary-glob, crnl-glob, empty-dirs, -encoding-glob, ignore-glob, keep-glob and -manifest. The most important is ignore-glob which -specifies which files should be ignored when looking for unmanaged files -with the extras command. +binary-glob, crlf-glob, crnl-glob, +empty-dirs, encoding-glob, ignore-glob, +keep-glob and manifest. The most important is +ignore-glob which specifies which files should be ignored when +looking for unmanaged files with the extras command. Because these options can change over time, and the inconvenience of replicating changes, these settings are "versionable". As well as being able to be set using the settings command or the web interface, you can create versioned files in the .fossil-settings Index: www/sync.wiki ================================================================== --- www/sync.wiki +++ www/sync.wiki @@ -529,10 +529,11 @@
  • binary-glob
  • clean-glob