Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Rename crnl-glob to crlf-glob, retaining support for crnl-glob as a compatibility alias. Change terminology from NL to LF throughout, excepting cases where NL means newline and not line feed. Also don't change linenoise.c which is third-party code. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | andygoth-crlf |
| Files: | files | file ages | folders |
| SHA1: |
2bc3cfebe61aeaa5968d3d6ed01c49fb |
| User & Date: | andygoth 2016-05-23 15:34:13.104 |
Context
|
2016-11-07
| ||
| 00:50 | Merge trunk ... (check-in: 7ea74acf55 user: andygoth tags: andygoth-crlf) | |
|
2016-05-23
| ||
| 15:34 | Rename crnl-glob to crlf-glob, retaining support for crnl-glob as a compatibility alias. Change terminology from NL to LF throughout, excepting cases where NL means newline and not line feed. Also don't change linenoise.c which is third-party code. ... (check-in: 2bc3cfebe6 user: andygoth tags: andygoth-crlf) | |
| 01:05 | Add brief documentation for compiling and using encrypted repositories. ... (check-in: 893905c83e user: drh tags: trunk) | |
Changes
Changes to src/checkin.c.
| ︙ | ︙ | |||
1460 1461 1462 1463 1464 1465 1466 | /* ** 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 | | | | 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 |
/*
** 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 LF line-endings,
** and the original file will have been renamed to "<filename>-original".
*/
static int commit_warning(
Blob *p, /* The content of the file being committed. */
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. */
const char *zFilename /* The full name of the file being committed. */
){
int bReverse; /* UTF-16 byte order is reversed? */
int fUnicode; /* return value of could_be_utf16() */
int fBinary; /* does the blob content appear to be binary? */
|
| ︙ | ︙ | |||
1518 1519 1520 1521 1522 1523 1524 |
zConvert = ""; /* We cannot convert binary files. */
}else{
zWarning = "binary data";
zConvert = ""; /* We cannot convert binary files. */
}
zDisable = "\"binary-glob\" setting";
}else if( fUnicode && fHasAnyCr ){
| | | | | | | | | | 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 |
zConvert = ""; /* We cannot convert binary files. */
}else{
zWarning = "binary data";
zConvert = ""; /* We cannot convert binary files. */
}
zDisable = "\"binary-glob\" setting";
}else if( fUnicode && fHasAnyCr ){
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/LF line endings and Unicode";
}else{
zWarning = "mixed line endings and Unicode";
}
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( crlfOk ){
return 0; /* We don't want CR/LF warnings for this file. */
}
if( fHasLoneCrOnly ){
zWarning = "CR line endings";
}else if( fHasCrLfOnly ){
zWarning = "CR/LF line endings";
}else{
zWarning = "mixed line endings";
}
zDisable = "\"crlf-glob\" setting";
}else{
if( encodingOk ){
return 0; /* We don't want encoding warnings for this file. */
}
zWarning = "Unicode";
zDisable = "\"encoding-glob\" setting";
}
|
| ︙ | ︙ | |||
1647 1648 1649 1650 1651 1652 1653 | ** appears. An empty check-in (i.e. with nothing changed) is not ** allowed unless the --allow-empty option appears. A check-in may not ** 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 | | | 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 |
** appears. An empty check-in (i.e. with nothing changed) is not
** allowed unless the --allow-empty option appears. A check-in may not
** 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/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.
**
** If a commit message is blank, you will be prompted:
** ("continue (y/N)?") to confirm you really want to commit with a
|
| ︙ | ︙ | |||
1992 1993 1994 1995 1996 1997 1998 |
** table. If there were arguments passed to this command, only
** the identified files are inserted (if they have been modified).
*/
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,
| | | | | | 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 |
** table. If there were arguments passed to this command, only
** the identified files are inserted (if they have been modified).
*/
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("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 crlfOk, binOk, encodingOk;
id = db_column_int(&q, 0);
zFullname = db_column_text(&q, 1);
rid = db_column_int(&q, 2);
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) ){
/* Instead of file content, put link destination path */
blob_read_link(&content, zFullname);
}else{
blob_read_from_file(&content, zFullname);
}
/* Do not emit any warnings when they are disabled. */
if( !noWarningFlag ){
abortCommit |= commit_warning(&content, crlfOk, binOk,
encodingOk, zFullname);
}
if( contains_merge_marker(&content) ){
Blob fname; /* Relative pathname of the file */
nConflict++;
file_relative_name(zFullname, &fname, 0);
|
| ︙ | ︙ |
Changes to src/configure.c.
| ︙ | ︙ | |||
119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
{ "project-description", CONFIGSET_PROJ },
{ "index-page", CONFIGSET_PROJ },
{ "manifest", CONFIGSET_PROJ },
{ "binary-glob", CONFIGSET_PROJ },
{ "clean-glob", CONFIGSET_PROJ },
{ "ignore-glob", CONFIGSET_PROJ },
{ "keep-glob", CONFIGSET_PROJ },
{ "crnl-glob", CONFIGSET_PROJ },
{ "encoding-glob", CONFIGSET_PROJ },
{ "empty-dirs", CONFIGSET_PROJ },
{ "allow-symlinks", CONFIGSET_PROJ },
{ "dotfiles", CONFIGSET_PROJ },
#ifdef FOSSIL_ENABLE_LEGACY_MV_RM
| > | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
{ "project-description", CONFIGSET_PROJ },
{ "index-page", CONFIGSET_PROJ },
{ "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 },
#ifdef FOSSIL_ENABLE_LEGACY_MV_RM
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 |
defined(__APPLE__)
{ "case-sensitive", 0, 0, 0, 0, "off" },
#else
{ "case-sensitive", 0, 0, 0, 0, "on" },
#endif
{ "clean-glob", 0, 40, 1, 0, "" },
{ "clearsign", 0, 0, 0, 0, "off" },
{ "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" },
{ "dotfiles", 0, 0, 1, 0, "off" },
{ "editor", 0, 32, 0, 0, "" },
| > | 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 |
defined(__APPLE__)
{ "case-sensitive", 0, 0, 0, 0, "off" },
#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" },
{ "dotfiles", 0, 0, 1, 0, "off" },
{ "editor", 0, 32, 0, 0, "" },
|
| ︙ | ︙ | |||
2682 2683 2684 2685 2686 2687 2688 | ** delete without prompting or allowing undo. ** Example: *.a,*.lib,*.o ** ** clearsign When enabled, fossil will attempt to sign all commits ** with gpg. When disabled (the default), commits will ** be unsigned. Default: off ** | | | | > | 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 | ** delete without prompting or allowing undo. ** Example: *.a,*.lib,*.o ** ** clearsign When enabled, fossil will attempt to sign all commits ** with gpg. When disabled (the default), commits will ** be unsigned. Default: off ** ** 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. ** ** diff-binary If TRUE (the default), permit files that may be binary ** or that match the "binary-glob" setting to be used with |
| ︙ | ︙ |
Changes to src/json_config.c.
| ︙ | ︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
{ "project-description", CONFIGSET_PROJ },
{ "index-page", CONFIGSET_PROJ },
{ "manifest", CONFIGSET_PROJ },
{ "binary-glob", CONFIGSET_PROJ },
{ "clean-glob", CONFIGSET_PROJ },
{ "ignore-glob", CONFIGSET_PROJ },
{ "keep-glob", CONFIGSET_PROJ },
{ "crnl-glob", CONFIGSET_PROJ },
{ "encoding-glob", CONFIGSET_PROJ },
{ "empty-dirs", CONFIGSET_PROJ },
{ "allow-symlinks", CONFIGSET_PROJ },
{ "dotfiles", CONFIGSET_PROJ },
{ "ticket-table", CONFIGSET_TKT },
| > | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
{ "project-description", CONFIGSET_PROJ },
{ "index-page", CONFIGSET_PROJ },
{ "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 },
{ "ticket-table", CONFIGSET_TKT },
|
| ︙ | ︙ |
Changes to src/printf.c.
| ︙ | ︙ | |||
1128 1129 1130 1131 1132 1133 1134 |
fossil_trace("%s\n", z);
}
}
free(z);
}
/*
| | | 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 |
fossil_trace("%s\n", z);
}
}
free(z);
}
/*
** 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);
#endif
#ifdef __EMX__ /* OS/2 */
|
| ︙ | ︙ |
Changes to src/report.c.
| ︙ | ︙ | |||
127 128 129 130 131 132 133 |
return mprintf("%d", atoi(zOrig));
}
return "";
}
/*
** Remove blank lines from the beginning of a string and
| | | | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
return mprintf("%d", atoi(zOrig));
}
return "";
}
/*
** Remove blank lines from the beginning of a string and
** 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; }
n = strlen(&zOrig[j]);
while( n>0 && fossil_isspace(zOrig[j+n-1]) ){ n--; }
|
| ︙ | ︙ |
Changes to www/settings.wiki.
| ︙ | ︙ | |||
31 32 33 34 35 36 37 | Most of the settings control the behaviour of fossil on your local machine, largely acting to reflect your preference on how you want to 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 <tt>allow-symlinks</tt>, | | | | | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | Most of the settings control the behaviour of fossil on your local machine, largely acting to reflect your preference on how you want to 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 <tt>allow-symlinks</tt>, <tt>binary-glob</tt>, <tt>crlf-glob</tt>, <tt>crnl-glob</tt>, <tt>empty-dirs</tt>, <tt>encoding-glob</tt>, <tt>ignore-glob</tt>, <tt>keep-glob</tt> and <tt>manifest</tt>. The most important is <tt>ignore-glob</tt> which specifies which files should be ignored when looking for unmanaged files with the <tt>extras</tt> 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 <tt>settings</tt> command or the web interface, you can create versioned files in the <tt>.fossil-settings</tt> subdirectory of the check-out root, named with the setting name. The contents of the file is the |
| ︙ | ︙ |
Changes to www/sync.wiki.
| ︙ | ︙ | |||
412 413 414 415 416 417 418 419 420 421 422 423 424 425 | <li> index-page <li> manifest <li> binary-glob <li> clean-glob <ul></td><td valign="top"><ul> <li> ignore-glob <li> keep-glob <li> crnl-glob <li> encoding-glob <li> empty-dirs <li> allow-symlinks <li> dotfiles <li> ticket-table <li> ticket-common | > | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | <li> index-page <li> manifest <li> binary-glob <li> clean-glob <ul></td><td valign="top"><ul> <li> ignore-glob <li> keep-glob <li> crlf-glob <li> crnl-glob <li> encoding-glob <li> empty-dirs <li> allow-symlinks <li> dotfiles <li> ticket-table <li> ticket-common |
| ︙ | ︙ |