Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 23022a8546d9fdc6bfb0560eb9c6b69db754b1c4 |
|---|---|
| Date: | 2012-06-25 15:43:40 |
| User: | drh |
| Comment: | Improved detection of changes to a file after a merge that do not change the size of the file. |
Tags And Properties
- branch=trunk inherited from [bf1c21ba16]
- sym-trunk inherited from [bf1c21ba16]
Changes
Changes to src/vfile.c
204 db_ephemeral_blob(&q, 5, &origCksum); 204 db_ephemeral_blob(&q, 5, &origCksum); 205 if( sha1sum_file(zName, &fileCksum) ){ 205 if( sha1sum_file(zName, &fileCksum) ){ 206 blob_zero(&fileCksum); 206 blob_zero(&fileCksum); 207 } 207 } 208 if( blob_compare(&fileCksum, &origCksum)==0 ) chnged = 0; 208 if( blob_compare(&fileCksum, &origCksum)==0 ) chnged = 0; 209 blob_reset(&origCksum); 209 blob_reset(&origCksum); 210 blob_reset(&fileCksum); 210 blob_reset(&fileCksum); > 211 }else if( (chnged==0 || chnged==2) 211 }else if( chnged==0 && (useMtime==0 || currentMtime!=oldMtime) ){ | 212 && (useMtime==0 || currentMtime!=oldMtime) ){ 212 /* For files that were formerly believed to be unchanged, if their | 213 /* For files that were formerly believed to be unchanged or that were 213 ** mtime changes, or unconditionally if --sha1sum is used, check | 214 ** changed by merging, if their mtime changes, or unconditionally > 215 ** if --sha1sum is used, check to see if they have been edited by 214 ** to see if they have been edited by looking at their SHA1 sum */ | 216 ** looking at their SHA1 sum */ 215 assert( origSize==currentSize ); 217 assert( origSize==currentSize ); 216 db_ephemeral_blob(&q, 5, &origCksum); 218 db_ephemeral_blob(&q, 5, &origCksum); 217 if( sha1sum_file(zName, &fileCksum) ){ 219 if( sha1sum_file(zName, &fileCksum) ){ 218 blob_zero(&fileCksum); 220 blob_zero(&fileCksum); 219 } 221 } 220 if( blob_compare(&fileCksum, &origCksum) ){ 222 if( blob_compare(&fileCksum, &origCksum) ){ 221 chnged = 1; 223 chnged = 1;