Fossil SCM
During commit, instead of using the '--force' option to bypass file type warnings, add a new option '--no-warnings'.
Commit
e9954e588bccc79836192ce559f448c119c59e95
Parent
be15485aa6a7820…
1 file changed
+4
-2
+4
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1023,10 +1023,11 @@ | ||
| 1023 | 1023 | const char *zComment; /* Check-in comment */ |
| 1024 | 1024 | Stmt q; /* Query to find files that have been modified */ |
| 1025 | 1025 | char *zUuid; /* UUID of the new check-in */ |
| 1026 | 1026 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 1027 | 1027 | int isAMerge = 0; /* True if checking in a merge */ |
| 1028 | + int noWarningFlag = 0; /* True if skipping all warnings */ | |
| 1028 | 1029 | int forceFlag = 0; /* Force a fork */ |
| 1029 | 1030 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1030 | 1031 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1031 | 1032 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1032 | 1033 | int binaryOk = 0; /* The --binary-ok flag */ |
| @@ -1061,10 +1062,11 @@ | ||
| 1061 | 1062 | fossil_fatal("cannot use --delta and --baseline together"); |
| 1062 | 1063 | } |
| 1063 | 1064 | testRun = find_option("test",0,0)!=0; |
| 1064 | 1065 | zComment = find_option("comment","m",1); |
| 1065 | 1066 | forceFlag = find_option("force", "f", 0)!=0; |
| 1067 | + noWarningFlag = find_option("no-warnings", 0, 0)!=0; | |
| 1066 | 1068 | zBranch = find_option("branch","b",1); |
| 1067 | 1069 | zColor = find_option("bgcolor",0,1); |
| 1068 | 1070 | zBrClr = find_option("branchcolor",0,1); |
| 1069 | 1071 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1070 | 1072 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -1286,12 +1288,12 @@ | ||
| 1286 | 1288 | /* Instead of file content, put link destination path */ |
| 1287 | 1289 | blob_read_link(&content, zFullname); |
| 1288 | 1290 | }else{ |
| 1289 | 1291 | blob_read_from_file(&content, zFullname); |
| 1290 | 1292 | } |
| 1291 | - if( !forceFlag ){ | |
| 1292 | - /* Do not emit any warnings in force mode. */ | |
| 1293 | + /* Do not emit any warnings when they are disabled. */ | |
| 1294 | + if( !noWarningFlag ){ | |
| 1293 | 1295 | commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname); |
| 1294 | 1296 | } |
| 1295 | 1297 | if( chnged==1 && contains_merge_marker(&content) ){ |
| 1296 | 1298 | Blob fname; /* Relative pathname of the file */ |
| 1297 | 1299 | |
| 1298 | 1300 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1023,10 +1023,11 @@ | |
| 1023 | const char *zComment; /* Check-in comment */ |
| 1024 | Stmt q; /* Query to find files that have been modified */ |
| 1025 | char *zUuid; /* UUID of the new check-in */ |
| 1026 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 1027 | int isAMerge = 0; /* True if checking in a merge */ |
| 1028 | int forceFlag = 0; /* Force a fork */ |
| 1029 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1030 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1031 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1032 | int binaryOk = 0; /* The --binary-ok flag */ |
| @@ -1061,10 +1062,11 @@ | |
| 1061 | fossil_fatal("cannot use --delta and --baseline together"); |
| 1062 | } |
| 1063 | testRun = find_option("test",0,0)!=0; |
| 1064 | zComment = find_option("comment","m",1); |
| 1065 | forceFlag = find_option("force", "f", 0)!=0; |
| 1066 | zBranch = find_option("branch","b",1); |
| 1067 | zColor = find_option("bgcolor",0,1); |
| 1068 | zBrClr = find_option("branchcolor",0,1); |
| 1069 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1070 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -1286,12 +1288,12 @@ | |
| 1286 | /* Instead of file content, put link destination path */ |
| 1287 | blob_read_link(&content, zFullname); |
| 1288 | }else{ |
| 1289 | blob_read_from_file(&content, zFullname); |
| 1290 | } |
| 1291 | if( !forceFlag ){ |
| 1292 | /* Do not emit any warnings in force mode. */ |
| 1293 | commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname); |
| 1294 | } |
| 1295 | if( chnged==1 && contains_merge_marker(&content) ){ |
| 1296 | Blob fname; /* Relative pathname of the file */ |
| 1297 | |
| 1298 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1023,10 +1023,11 @@ | |
| 1023 | const char *zComment; /* Check-in comment */ |
| 1024 | Stmt q; /* Query to find files that have been modified */ |
| 1025 | char *zUuid; /* UUID of the new check-in */ |
| 1026 | int noSign = 0; /* True to omit signing the manifest using GPG */ |
| 1027 | int isAMerge = 0; /* True if checking in a merge */ |
| 1028 | int noWarningFlag = 0; /* True if skipping all warnings */ |
| 1029 | int forceFlag = 0; /* Force a fork */ |
| 1030 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1031 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1032 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1033 | int binaryOk = 0; /* The --binary-ok flag */ |
| @@ -1061,10 +1062,11 @@ | |
| 1062 | fossil_fatal("cannot use --delta and --baseline together"); |
| 1063 | } |
| 1064 | testRun = find_option("test",0,0)!=0; |
| 1065 | zComment = find_option("comment","m",1); |
| 1066 | forceFlag = find_option("force", "f", 0)!=0; |
| 1067 | noWarningFlag = find_option("no-warnings", 0, 0)!=0; |
| 1068 | zBranch = find_option("branch","b",1); |
| 1069 | zColor = find_option("bgcolor",0,1); |
| 1070 | zBrClr = find_option("branchcolor",0,1); |
| 1071 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1072 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| @@ -1286,12 +1288,12 @@ | |
| 1288 | /* Instead of file content, put link destination path */ |
| 1289 | blob_read_link(&content, zFullname); |
| 1290 | }else{ |
| 1291 | blob_read_from_file(&content, zFullname); |
| 1292 | } |
| 1293 | /* Do not emit any warnings when they are disabled. */ |
| 1294 | if( !noWarningFlag ){ |
| 1295 | commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname); |
| 1296 | } |
| 1297 | if( chnged==1 && contains_merge_marker(&content) ){ |
| 1298 | Blob fname; /* Relative pathname of the file */ |
| 1299 | |
| 1300 |