Fossil SCM

Add the --binary-ok flag to the "fossil commit" command. Ticket [63cc656c9dfef126]

drh 2012-11-11 17:59 trunk
Commit 8c7faee6c5fac25b8456e96070ce068400d1d7e1
1 file changed +4 -1
+4 -1
--- src/checkin.c
+++ src/checkin.c
@@ -1002,10 +1002,11 @@
10021002
** --message-file|-M FILE read the commit comment from given file
10031003
** --nosign do not attempt to sign this commit with gpg
10041004
** --private do not sync changes and their descendants
10051005
** --tag TAG-NAME assign given tag TAG-NAME to the checkin
10061006
** --conflict allow unresolved merge conflicts
1007
+** --binary-ok do not warn about committing binary files
10071008
**
10081009
** See also: branch, changes, checkout, extra, sync
10091010
*/
10101011
void commit_cmd(void){
10111012
int hasChanges; /* True if unsaved changes exist */
@@ -1020,10 +1021,11 @@
10201021
int isAMerge = 0; /* True if checking in a merge */
10211022
int forceFlag = 0; /* Force a fork */
10221023
int forceDelta = 0; /* Force a delta-manifest */
10231024
int forceBaseline = 0; /* Force a baseline-manifest */
10241025
int allowConflict = 0; /* Allow unresolve merge conflicts */
1026
+ int binaryOk = 0; /* The --binary-ok flag */
10251027
char *zManifestFile; /* Name of the manifest file */
10261028
int useCksum; /* True if checksums should be computed and verified */
10271029
int outputManifest; /* True to output "manifest" and "manifest.uuid" */
10281030
int testRun; /* True for a test run. Debugging only */
10291031
const char *zBranch; /* Create a new branch with this name */
@@ -1056,10 +1058,11 @@
10561058
zComment = find_option("comment","m",1);
10571059
forceFlag = find_option("force", "f", 0)!=0;
10581060
zBranch = find_option("branch","b",1);
10591061
zColor = find_option("bgcolor",0,1);
10601062
zBrClr = find_option("branchcolor",0,1);
1063
+ binaryOk = find_option("binary-ok",0,0)!=0;
10611064
while( (zTag = find_option("tag",0,1))!=0 ){
10621065
if( zTag[0]==0 ) continue;
10631066
azTag = fossil_realloc((void *)azTag, sizeof(char*)*(nTag+2));
10641067
azTag[nTag++] = zTag;
10651068
azTag[nTag] = 0;
@@ -1265,11 +1268,11 @@
12651268
id = db_column_int(&q, 0);
12661269
zFullname = db_column_text(&q, 1);
12671270
rid = db_column_int(&q, 2);
12681271
crnlOk = db_column_int(&q, 3);
12691272
chnged = db_column_int(&q, 4);
1270
- binOk = db_column_int(&q, 5);
1273
+ binOk = binaryOk || db_column_int(&q, 5);
12711274
12721275
blob_zero(&content);
12731276
if( file_wd_islink(zFullname) ){
12741277
/* Instead of file content, put link destination path */
12751278
blob_read_link(&content, zFullname);
12761279
--- 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

Keyboard Shortcuts

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