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.

drh 2025-03-18 12:31 trunk
Commit 5c8de3496dc8025fa06720b0a6b8d936bb68e17f74e58d45ae65d98885a9f81c
1 file changed +14 -6
+14 -6
--- src/checkin.c
+++ src/checkin.c
@@ -2415,13 +2415,11 @@
24152415
** --allow-empty Allow a commit with no changes
24162416
** --allow-fork Allow the commit to fork
24172417
** --allow-older Allow a commit older than its ancestor
24182418
** --allow-suspect-comment Allow checkin comments that might be misformed
24192419
** --baseline Use a baseline manifest in the commit process
2420
-** --bgcolor COLOR Apply COLOR to this one check-in only
24212420
** --branch NEW-BRANCH-NAME Check in to this new branch
2422
-** --branchcolor COLOR Apply given COLOR to the branch
24232421
** --close Close the branch being committed
24242422
** --date-override DATETIME DATE to use instead of 'now'
24252423
** --delta Use a delta manifest in the commit process
24262424
** --hash Verify file status using hashing rather
24272425
** than relying on file mtimes
@@ -2550,12 +2548,16 @@
25502548
noPrompt = find_option("no-prompt", 0, 0)!=0;
25512549
noWarningFlag = find_option("no-warnings", 0, 0)!=0;
25522550
noVerify = find_option("no-verify",0,0)!=0;
25532551
bTrace = find_option("trace",0,0)!=0;
25542552
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
+
25572559
sCiInfo.closeFlag = find_option("close",0,0)!=0;
25582560
sCiInfo.integrateFlag = find_option("integrate",0,0)!=0;
25592561
sCiInfo.zMimetype = find_option("mimetype",0,1);
25602562
sCiInfo.verboseFlag = find_option("verbose", "v", 0)!=0;
25612563
while( (zTag = find_option("tag",0,1))!=0 ){
@@ -2574,10 +2576,16 @@
25742576
bIgnoreSkew = find_option("ignore-clock-skew",0,0)!=0;
25752577
outputManifest = db_get_manifest_setting(0);
25762578
mxSize = db_large_file_size();
25772579
if( find_option("ignore-oversize",0,0)!=0 ) mxSize = 0;
25782580
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
+ }
25792587
25802588
/* Get the ID of the parent manifest artifact */
25812589
vid = db_lget_int("checkout", 0);
25822590
if( vid==0 ){
25832591
useCksum = 1;
@@ -2868,20 +2876,20 @@
28682876
*/
28692877
if( zComment ){
28702878
Blob sus;
28712879
blob_zero(&comment);
28722880
blob_append(&comment, zComment, -1);
2873
- if( !forceFlag && !allowSusCom && suspicious_comment(&comment, &sus) ){
2881
+ if( !allowSusCom && suspicious_comment(&comment, &sus) ){
28742882
fossil_fatal("%bCommit aborted; "
28752883
"use --allow-suspect-comment to override", &sus);
28762884
}
28772885
}else if( zComFile ){
28782886
Blob sus;
28792887
blob_zero(&comment);
28802888
blob_read_from_file(&comment, zComFile, ExtFILE);
28812889
blob_to_utf8_no_bom(&comment, 1);
2882
- if( !forceFlag && !allowSusCom && suspicious_comment(&comment, &sus) ){
2890
+ if( !allowSusCom && suspicious_comment(&comment, &sus) ){
28832891
fossil_fatal("%bCommit aborted; "
28842892
"use --allow-suspect-comment to override", &sus);
28852893
}
28862894
}else if( !noPrompt ){
28872895
while( 1/*exit-by-break*/ ){
28882896
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button