Diff
Not logged in

Differences From:

File src/checkin.c part of check-in [6aff11f03f] - Show an error if unrecognized command-line options appear on the commit command. Also add the (undocumented) "omit-ci-sig" configuration option on the database. Setting omit-ci-sig omits the PGP signature on check-in. by drh on 2007-08-03 23:30:52. [view]

To:

File src/checkin.c part of check-in [aafd536a5c] - Prohibit partial check-ins of a merge. To allow such a thing would confuse the branch tracking logic. There are still problems in the partial check-in logic for cases were new files have been added to the repository. by drh on 2007-08-04 00:26:40. [view]

@@ -231,9 +231,9 @@
 void select_commit_files(void){
   if( g.argc>2 ){
     int ii;
     Blob b;
-    memset(&b, 0, sizeof(Blob));
+    blob_zero(&b);
     g.aCommitFile = malloc(sizeof(int)*(g.argc-1));
 
     for(ii=2; ii<g.argc; ii++){
       int iId;
@@ -244,8 +244,9 @@
       if( iId<0 ){
         fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
       }
       g.aCommitFile[ii-2] = iId;
+      blob_reset(&b);
     }
     g.aCommitFile[ii-2] = 0;
   }
 }
@@ -289,8 +290,11 @@
   ** for each file to be committed. Or, if aCommitFile is NULL, all files
   ** should be committed.
   */
   select_commit_files();
+  if( g.aCommitFile && db_exists("SELECT 1 FROM vmerge") ){
+    fossil_fatal("cannot do a partial commit of a merge");
+  }
 
   user_select();
   db_begin_transaction();
   rc = unsaved_changes();