Diff
Not logged in

Differences From:

File src/manifest.c part of check-in [18b1f6788d] - Make sure the same manifest never gets inserted into the metadata tables twice - resulting in duplicate timeline entries. by drh on 2007-08-28 03:04:09. Also file src/manifest.c part of check-in [15652ff081] - Merged drh's fixes new features (xfer, timeline handling, javascript based timeline highlighting) into my branch. by aku on 2007-08-29 02:55:33. [view]

To:

File src/manifest.c part of check-in [f030c0aea7] - Fix multiple bugs in the comment parser of the commit command. Allow blank lines in comments. by drh on 2007-08-30 19:46:06. [view]

@@ -95,17 +95,17 @@
       }
       if( seenHeader ){
         break;
       }
-      while( blob_line(pContent, &line)>1 ){}
+      while( blob_line(pContent, &line)>2 ){}
       if( blob_line(pContent, &line)==0 ) break;
       z = blob_buffer(&line);
     }
     seenHeader = 1;
     if( blob_token(&line, &token)!=1 ) goto manifest_syntax_error;
     if( z[0]=='F' ){
       char *zName, *zUuid;
-      md5sum_step_text(blob_buffer(&line), blob_size(&line)+1);
+      md5sum_step_text(blob_buffer(&line), blob_size(&line));
       if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a2)==0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a3)!=0 ) goto manifest_syntax_error;
       zName = blob_terminate(&a1);
@@ -127,39 +127,39 @@
       if( i>0 && strcmp(p->aFile[i-1].zName, zName)>=0 ){
         goto manifest_syntax_error;
       }
     }else if( z[0]=='C' ){
-      md5sum_step_text(blob_buffer(&line), blob_size(&line)+1);
+      md5sum_step_text(blob_buffer(&line), blob_size(&line));
       if( p->zComment!=0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error;
       p->zComment = blob_terminate(&a1);
       defossilize(p->zComment);
     }else if( z[0]=='D' ){
       char *zDate;
-      md5sum_step_text(blob_buffer(&line), blob_size(&line)+1);
+      md5sum_step_text(blob_buffer(&line), blob_size(&line));
       if( p->rDate!=0.0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error;
       zDate = blob_terminate(&a1);
       p->rDate = db_double(0.0, "SELECT julianday(%Q)", zDate);
     }else if( z[0]=='U' ){
-      md5sum_step_text(blob_buffer(&line), blob_size(&line)+1);
+      md5sum_step_text(blob_buffer(&line), blob_size(&line));
       if( p->zUser!=0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error;
       p->zUser = blob_terminate(&a1);
       defossilize(p->zUser);
     }else if( z[0]=='R' ){
-      md5sum_step_text(blob_buffer(&line), blob_size(&line)+1);
+      md5sum_step_text(blob_buffer(&line), blob_size(&line));
       if( p->zRepoCksum!=0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
       if( blob_token(&line, &a2)!=0 ) goto manifest_syntax_error;
       if( blob_size(&a1)!=32 ) goto manifest_syntax_error;
       p->zRepoCksum = blob_terminate(&a1);
       if( !validate16(p->zRepoCksum, 32) ) goto manifest_syntax_error;
     }else if( z[0]=='P' ){
-      md5sum_step_text(blob_buffer(&line), blob_size(&line)+1);
+      md5sum_step_text(blob_buffer(&line), blob_size(&line));
       while( blob_token(&line, &a1) ){
         char *zUuid;
         if( blob_size(&a1)!=UUID_SIZE ) goto manifest_syntax_error;
         zUuid = blob_terminate(&a1);