Fossil SCM
Omit the --bgcolor and --branchcolor options from the documentation of "fossil commit". The options still work, but their use is discouraged. Removing them from the official documentation will reduce the temptation to use them. Also: The --no-warnings flag implies --allow-suspect-comment.
Commit
5c8de3496dc8025fa06720b0a6b8d936bb68e17f74e58d45ae65d98885a9f81c
Parent
fcd4d049dd563a5…
1 file changed
+14
-6
+14
-6
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2415,13 +2415,11 @@ | ||
| 2415 | 2415 | ** --allow-empty Allow a commit with no changes |
| 2416 | 2416 | ** --allow-fork Allow the commit to fork |
| 2417 | 2417 | ** --allow-older Allow a commit older than its ancestor |
| 2418 | 2418 | ** --allow-suspect-comment Allow checkin comments that might be misformed |
| 2419 | 2419 | ** --baseline Use a baseline manifest in the commit process |
| 2420 | -** --bgcolor COLOR Apply COLOR to this one check-in only | |
| 2421 | 2420 | ** --branch NEW-BRANCH-NAME Check in to this new branch |
| 2422 | -** --branchcolor COLOR Apply given COLOR to the branch | |
| 2423 | 2421 | ** --close Close the branch being committed |
| 2424 | 2422 | ** --date-override DATETIME DATE to use instead of 'now' |
| 2425 | 2423 | ** --delta Use a delta manifest in the commit process |
| 2426 | 2424 | ** --hash Verify file status using hashing rather |
| 2427 | 2425 | ** than relying on file mtimes |
| @@ -2550,12 +2548,16 @@ | ||
| 2550 | 2548 | noPrompt = find_option("no-prompt", 0, 0)!=0; |
| 2551 | 2549 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 2552 | 2550 | noVerify = find_option("no-verify",0,0)!=0; |
| 2553 | 2551 | bTrace = find_option("trace",0,0)!=0; |
| 2554 | 2552 | sCiInfo.zBranch = find_option("branch","b",1); |
| 2555 | - sCiInfo.zColor = find_option("bgcolor",0,1); | |
| 2556 | - sCiInfo.zBrClr = find_option("branchcolor",0,1); | |
| 2553 | + | |
| 2554 | + /* NB: the --bgcolor and --branchcolor flags still work, but are | |
| 2555 | + ** now undocumented, to discourage their use. */ | |
| 2556 | + sCiInfo.zColor = find_option("bgcolor",0,1); /* Deprecated, undocumented*/ | |
| 2557 | + sCiInfo.zBrClr = find_option("branchcolor",0,1); /* Deprecated, undocumented*/ | |
| 2558 | + | |
| 2557 | 2559 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 2558 | 2560 | sCiInfo.integrateFlag = find_option("integrate",0,0)!=0; |
| 2559 | 2561 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 2560 | 2562 | sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0; |
| 2561 | 2563 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -2574,10 +2576,16 @@ | ||
| 2574 | 2576 | bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0; |
| 2575 | 2577 | outputManifest = db_get_manifest_setting(0); |
| 2576 | 2578 | mxSize = db_large_file_size(); |
| 2577 | 2579 | if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0; |
| 2578 | 2580 | verify_all_options(); |
| 2581 | + | |
| 2582 | + /* The --no-warnings flag and the --force flag each imply | |
| 2583 | + ** the --allow-suspect-comment flag */ | |
| 2584 | + if( noWarningFlag || forceFlag ){ | |
| 2585 | + allowSusCom = 1; | |
| 2586 | + } | |
| 2579 | 2587 | |
| 2580 | 2588 | /* Get the ID of the parent manifest artifact */ |
| 2581 | 2589 | vid = db_lget_int("checkout", 0); |
| 2582 | 2590 | if( vid==0 ){ |
| 2583 | 2591 | useCksum = 1; |
| @@ -2868,20 +2876,20 @@ | ||
| 2868 | 2876 | */ |
| 2869 | 2877 | if( zComment ){ |
| 2870 | 2878 | Blob sus; |
| 2871 | 2879 | blob_zero(&comment); |
| 2872 | 2880 | blob_append(&comment, zComment, -1); |
| 2873 | - if( !forceFlag && !allowSusCom && suspicious_comment(&comment, &sus) ){ | |
| 2881 | + if( !allowSusCom && suspicious_comment(&comment, &sus) ){ | |
| 2874 | 2882 | fossil_fatal("%bCommit aborted; " |
| 2875 | 2883 | "use --allow-suspect-comment to override", &sus); |
| 2876 | 2884 | } |
| 2877 | 2885 | }else if( zComFile ){ |
| 2878 | 2886 | Blob sus; |
| 2879 | 2887 | blob_zero(&comment); |
| 2880 | 2888 | blob_read_from_file(&comment, zComFile, ExtFILE); |
| 2881 | 2889 | blob_to_utf8_no_bom(&comment, 1); |
| 2882 | - if( !forceFlag && !allowSusCom && suspicious_comment(&comment, &sus) ){ | |
| 2890 | + if( !allowSusCom && suspicious_comment(&comment, &sus) ){ | |
| 2883 | 2891 | fossil_fatal("%bCommit aborted; " |
| 2884 | 2892 | "use --allow-suspect-comment to override", &sus); |
| 2885 | 2893 | } |
| 2886 | 2894 | }else if( !noPrompt ){ |
| 2887 | 2895 | while( 1/*exit-by-break*/ ){ |
| 2888 | 2896 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2415,13 +2415,11 @@ | |
| 2415 | ** --allow-empty Allow a commit with no changes |
| 2416 | ** --allow-fork Allow the commit to fork |
| 2417 | ** --allow-older Allow a commit older than its ancestor |
| 2418 | ** --allow-suspect-comment Allow checkin comments that might be misformed |
| 2419 | ** --baseline Use a baseline manifest in the commit process |
| 2420 | ** --bgcolor COLOR Apply COLOR to this one check-in only |
| 2421 | ** --branch NEW-BRANCH-NAME Check in to this new branch |
| 2422 | ** --branchcolor COLOR Apply given COLOR to the branch |
| 2423 | ** --close Close the branch being committed |
| 2424 | ** --date-override DATETIME DATE to use instead of 'now' |
| 2425 | ** --delta Use a delta manifest in the commit process |
| 2426 | ** --hash Verify file status using hashing rather |
| 2427 | ** than relying on file mtimes |
| @@ -2550,12 +2548,16 @@ | |
| 2550 | noPrompt = find_option("no-prompt", 0, 0)!=0; |
| 2551 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 2552 | noVerify = find_option("no-verify",0,0)!=0; |
| 2553 | bTrace = find_option("trace",0,0)!=0; |
| 2554 | sCiInfo.zBranch = find_option("branch","b",1); |
| 2555 | sCiInfo.zColor = find_option("bgcolor",0,1); |
| 2556 | sCiInfo.zBrClr = find_option("branchcolor",0,1); |
| 2557 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 2558 | sCiInfo.integrateFlag = find_option("integrate",0,0)!=0; |
| 2559 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 2560 | sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0; |
| 2561 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -2574,10 +2576,16 @@ | |
| 2574 | bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0; |
| 2575 | outputManifest = db_get_manifest_setting(0); |
| 2576 | mxSize = db_large_file_size(); |
| 2577 | if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0; |
| 2578 | verify_all_options(); |
| 2579 | |
| 2580 | /* Get the ID of the parent manifest artifact */ |
| 2581 | vid = db_lget_int("checkout", 0); |
| 2582 | if( vid==0 ){ |
| 2583 | useCksum = 1; |
| @@ -2868,20 +2876,20 @@ | |
| 2868 | */ |
| 2869 | if( zComment ){ |
| 2870 | Blob sus; |
| 2871 | blob_zero(&comment); |
| 2872 | blob_append(&comment, zComment, -1); |
| 2873 | if( !forceFlag && !allowSusCom && suspicious_comment(&comment, &sus) ){ |
| 2874 | fossil_fatal("%bCommit aborted; " |
| 2875 | "use --allow-suspect-comment to override", &sus); |
| 2876 | } |
| 2877 | }else if( zComFile ){ |
| 2878 | Blob sus; |
| 2879 | blob_zero(&comment); |
| 2880 | blob_read_from_file(&comment, zComFile, ExtFILE); |
| 2881 | blob_to_utf8_no_bom(&comment, 1); |
| 2882 | if( !forceFlag && !allowSusCom && suspicious_comment(&comment, &sus) ){ |
| 2883 | fossil_fatal("%bCommit aborted; " |
| 2884 | "use --allow-suspect-comment to override", &sus); |
| 2885 | } |
| 2886 | }else if( !noPrompt ){ |
| 2887 | while( 1/*exit-by-break*/ ){ |
| 2888 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2415,13 +2415,11 @@ | |
| 2415 | ** --allow-empty Allow a commit with no changes |
| 2416 | ** --allow-fork Allow the commit to fork |
| 2417 | ** --allow-older Allow a commit older than its ancestor |
| 2418 | ** --allow-suspect-comment Allow checkin comments that might be misformed |
| 2419 | ** --baseline Use a baseline manifest in the commit process |
| 2420 | ** --branch NEW-BRANCH-NAME Check in to this new branch |
| 2421 | ** --close Close the branch being committed |
| 2422 | ** --date-override DATETIME DATE to use instead of 'now' |
| 2423 | ** --delta Use a delta manifest in the commit process |
| 2424 | ** --hash Verify file status using hashing rather |
| 2425 | ** than relying on file mtimes |
| @@ -2550,12 +2548,16 @@ | |
| 2548 | noPrompt = find_option("no-prompt", 0, 0)!=0; |
| 2549 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 2550 | noVerify = find_option("no-verify",0,0)!=0; |
| 2551 | bTrace = find_option("trace",0,0)!=0; |
| 2552 | sCiInfo.zBranch = find_option("branch","b",1); |
| 2553 | |
| 2554 | /* NB: the --bgcolor and --branchcolor flags still work, but are |
| 2555 | ** now undocumented, to discourage their use. */ |
| 2556 | sCiInfo.zColor = find_option("bgcolor",0,1); /* Deprecated, undocumented*/ |
| 2557 | sCiInfo.zBrClr = find_option("branchcolor",0,1); /* Deprecated, undocumented*/ |
| 2558 | |
| 2559 | sCiInfo.closeFlag = find_option("close",0,0)!=0; |
| 2560 | sCiInfo.integrateFlag = find_option("integrate",0,0)!=0; |
| 2561 | sCiInfo.zMimetype = find_option("mimetype",0,1); |
| 2562 | sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0; |
| 2563 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -2574,10 +2576,16 @@ | |
| 2576 | bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0; |
| 2577 | outputManifest = db_get_manifest_setting(0); |
| 2578 | mxSize = db_large_file_size(); |
| 2579 | if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0; |
| 2580 | verify_all_options(); |
| 2581 | |
| 2582 | /* The --no-warnings flag and the --force flag each imply |
| 2583 | ** the --allow-suspect-comment flag */ |
| 2584 | if( noWarningFlag || forceFlag ){ |
| 2585 | allowSusCom = 1; |
| 2586 | } |
| 2587 | |
| 2588 | /* Get the ID of the parent manifest artifact */ |
| 2589 | vid = db_lget_int("checkout", 0); |
| 2590 | if( vid==0 ){ |
| 2591 | useCksum = 1; |
| @@ -2868,20 +2876,20 @@ | |
| 2876 | */ |
| 2877 | if( zComment ){ |
| 2878 | Blob sus; |
| 2879 | blob_zero(&comment); |
| 2880 | blob_append(&comment, zComment, -1); |
| 2881 | if( !allowSusCom && suspicious_comment(&comment, &sus) ){ |
| 2882 | fossil_fatal("%bCommit aborted; " |
| 2883 | "use --allow-suspect-comment to override", &sus); |
| 2884 | } |
| 2885 | }else if( zComFile ){ |
| 2886 | Blob sus; |
| 2887 | blob_zero(&comment); |
| 2888 | blob_read_from_file(&comment, zComFile, ExtFILE); |
| 2889 | blob_to_utf8_no_bom(&comment, 1); |
| 2890 | if( !allowSusCom && suspicious_comment(&comment, &sus) ){ |
| 2891 | fossil_fatal("%bCommit aborted; " |
| 2892 | "use --allow-suspect-comment to override", &sus); |
| 2893 | } |
| 2894 | }else if( !noPrompt ){ |
| 2895 | while( 1/*exit-by-break*/ ){ |
| 2896 |