Fossil SCM
Add the --binary-ok flag to the "fossil commit" command. Ticket [63cc656c9dfef126]
Commit
8c7faee6c5fac25b8456e96070ce068400d1d7e1
Parent
449947b7d61905d…
1 file changed
+4
-1
+4
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1002,10 +1002,11 @@ | ||
| 1002 | 1002 | ** --message-file|-M FILE read the commit comment from given file |
| 1003 | 1003 | ** --nosign do not attempt to sign this commit with gpg |
| 1004 | 1004 | ** --private do not sync changes and their descendants |
| 1005 | 1005 | ** --tag TAG-NAME assign given tag TAG-NAME to the checkin |
| 1006 | 1006 | ** --conflict allow unresolved merge conflicts |
| 1007 | +** --binary-ok do not warn about committing binary files | |
| 1007 | 1008 | ** |
| 1008 | 1009 | ** See also: branch, changes, checkout, extra, sync |
| 1009 | 1010 | */ |
| 1010 | 1011 | void commit_cmd(void){ |
| 1011 | 1012 | int hasChanges; /* True if unsaved changes exist */ |
| @@ -1020,10 +1021,11 @@ | ||
| 1020 | 1021 | int isAMerge = 0; /* True if checking in a merge */ |
| 1021 | 1022 | int forceFlag = 0; /* Force a fork */ |
| 1022 | 1023 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1023 | 1024 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1024 | 1025 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1026 | + int binaryOk = 0; /* The --binary-ok flag */ | |
| 1025 | 1027 | char *zManifestFile; /* Name of the manifest file */ |
| 1026 | 1028 | int useCksum; /* True if checksums should be computed and verified */ |
| 1027 | 1029 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 1028 | 1030 | int testRun; /* True for a test run. Debugging only */ |
| 1029 | 1031 | const char *zBranch; /* Create a new branch with this name */ |
| @@ -1056,10 +1058,11 @@ | ||
| 1056 | 1058 | zComment = find_option("comment","m",1); |
| 1057 | 1059 | forceFlag = find_option("force", "f", 0)!=0; |
| 1058 | 1060 | zBranch = find_option("branch","b",1); |
| 1059 | 1061 | zColor = find_option("bgcolor",0,1); |
| 1060 | 1062 | zBrClr = find_option("branchcolor",0,1); |
| 1063 | + binaryOk = find_option("binary-ok",0,0)!=0; | |
| 1061 | 1064 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1062 | 1065 | if( zTag[0]==0 ) continue; |
| 1063 | 1066 | azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2)); |
| 1064 | 1067 | azTag[nTag++] = zTag; |
| 1065 | 1068 | azTag[nTag] = 0; |
| @@ -1265,11 +1268,11 @@ | ||
| 1265 | 1268 | id = db_column_int(&q, 0); |
| 1266 | 1269 | zFullname = db_column_text(&q, 1); |
| 1267 | 1270 | rid = db_column_int(&q, 2); |
| 1268 | 1271 | crnlOk = db_column_int(&q, 3); |
| 1269 | 1272 | chnged = db_column_int(&q, 4); |
| 1270 | - binOk = db_column_int(&q, 5); | |
| 1273 | + binOk = binaryOk || db_column_int(&q, 5); | |
| 1271 | 1274 | |
| 1272 | 1275 | blob_zero(&content); |
| 1273 | 1276 | if( file_wd_islink(zFullname) ){ |
| 1274 | 1277 | /* Instead of file content, put link destination path */ |
| 1275 | 1278 | blob_read_link(&content, zFullname); |
| 1276 | 1279 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1002,10 +1002,11 @@ | |
| 1002 | ** --message-file|-M FILE read the commit comment from given file |
| 1003 | ** --nosign do not attempt to sign this commit with gpg |
| 1004 | ** --private do not sync changes and their descendants |
| 1005 | ** --tag TAG-NAME assign given tag TAG-NAME to the checkin |
| 1006 | ** --conflict allow unresolved merge conflicts |
| 1007 | ** |
| 1008 | ** See also: branch, changes, checkout, extra, sync |
| 1009 | */ |
| 1010 | void commit_cmd(void){ |
| 1011 | int hasChanges; /* True if unsaved changes exist */ |
| @@ -1020,10 +1021,11 @@ | |
| 1020 | int isAMerge = 0; /* True if checking in a merge */ |
| 1021 | int forceFlag = 0; /* Force a fork */ |
| 1022 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1023 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1024 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1025 | char *zManifestFile; /* Name of the manifest file */ |
| 1026 | int useCksum; /* True if checksums should be computed and verified */ |
| 1027 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 1028 | int testRun; /* True for a test run. Debugging only */ |
| 1029 | const char *zBranch; /* Create a new branch with this name */ |
| @@ -1056,10 +1058,11 @@ | |
| 1056 | zComment = find_option("comment","m",1); |
| 1057 | forceFlag = find_option("force", "f", 0)!=0; |
| 1058 | zBranch = find_option("branch","b",1); |
| 1059 | zColor = find_option("bgcolor",0,1); |
| 1060 | zBrClr = find_option("branchcolor",0,1); |
| 1061 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1062 | if( zTag[0]==0 ) continue; |
| 1063 | azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2)); |
| 1064 | azTag[nTag++] = zTag; |
| 1065 | azTag[nTag] = 0; |
| @@ -1265,11 +1268,11 @@ | |
| 1265 | id = db_column_int(&q, 0); |
| 1266 | zFullname = db_column_text(&q, 1); |
| 1267 | rid = db_column_int(&q, 2); |
| 1268 | crnlOk = db_column_int(&q, 3); |
| 1269 | chnged = db_column_int(&q, 4); |
| 1270 | binOk = db_column_int(&q, 5); |
| 1271 | |
| 1272 | blob_zero(&content); |
| 1273 | if( file_wd_islink(zFullname) ){ |
| 1274 | /* Instead of file content, put link destination path */ |
| 1275 | blob_read_link(&content, zFullname); |
| 1276 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1002,10 +1002,11 @@ | |
| 1002 | ** --message-file|-M FILE read the commit comment from given file |
| 1003 | ** --nosign do not attempt to sign this commit with gpg |
| 1004 | ** --private do not sync changes and their descendants |
| 1005 | ** --tag TAG-NAME assign given tag TAG-NAME to the checkin |
| 1006 | ** --conflict allow unresolved merge conflicts |
| 1007 | ** --binary-ok do not warn about committing binary files |
| 1008 | ** |
| 1009 | ** See also: branch, changes, checkout, extra, sync |
| 1010 | */ |
| 1011 | void commit_cmd(void){ |
| 1012 | int hasChanges; /* True if unsaved changes exist */ |
| @@ -1020,10 +1021,11 @@ | |
| 1021 | int isAMerge = 0; /* True if checking in a merge */ |
| 1022 | int forceFlag = 0; /* Force a fork */ |
| 1023 | int forceDelta = 0; /* Force a delta-manifest */ |
| 1024 | int forceBaseline = 0; /* Force a baseline-manifest */ |
| 1025 | int allowConflict = 0; /* Allow unresolve merge conflicts */ |
| 1026 | int binaryOk = 0; /* The --binary-ok flag */ |
| 1027 | char *zManifestFile; /* Name of the manifest file */ |
| 1028 | int useCksum; /* True if checksums should be computed and verified */ |
| 1029 | int outputManifest; /* True to output "manifest" and "manifest.uuid" */ |
| 1030 | int testRun; /* True for a test run. Debugging only */ |
| 1031 | const char *zBranch; /* Create a new branch with this name */ |
| @@ -1056,10 +1058,11 @@ | |
| 1058 | zComment = find_option("comment","m",1); |
| 1059 | forceFlag = find_option("force", "f", 0)!=0; |
| 1060 | zBranch = find_option("branch","b",1); |
| 1061 | zColor = find_option("bgcolor",0,1); |
| 1062 | zBrClr = find_option("branchcolor",0,1); |
| 1063 | binaryOk = find_option("binary-ok",0,0)!=0; |
| 1064 | while( (zTag = find_option("tag",0,1))!=0 ){ |
| 1065 | if( zTag[0]==0 ) continue; |
| 1066 | azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2)); |
| 1067 | azTag[nTag++] = zTag; |
| 1068 | azTag[nTag] = 0; |
| @@ -1265,11 +1268,11 @@ | |
| 1268 | id = db_column_int(&q, 0); |
| 1269 | zFullname = db_column_text(&q, 1); |
| 1270 | rid = db_column_int(&q, 2); |
| 1271 | crnlOk = db_column_int(&q, 3); |
| 1272 | chnged = db_column_int(&q, 4); |
| 1273 | binOk = binaryOk || db_column_int(&q, 5); |
| 1274 | |
| 1275 | blob_zero(&content); |
| 1276 | if( file_wd_islink(zFullname) ){ |
| 1277 | /* Instead of file content, put link destination path */ |
| 1278 | blob_read_link(&content, zFullname); |
| 1279 |