Fossil SCM
Fix the file change detection logic so that it does not destroy merge history. Ticket [5a855f1bc6351f5].
Commit
bcd718e924ad5c550d6c6e9240ce6ab08f9b6708
Parent
ecbc3701327b431…
1 file changed
+1
-1
+1
-1
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -195,11 +195,11 @@ | ||
| 195 | 195 | if( chnged==0 ){ |
| 196 | 196 | /* A file size change is definitive - the file has changed. No |
| 197 | 197 | ** need to check the mtime or sha1sum */ |
| 198 | 198 | chnged = 1; |
| 199 | 199 | } |
| 200 | - }else if( (chnged==1 || chnged==2) && rid!=0 && !isDeleted ){ | |
| 200 | + }else if( chnged==1 && rid!=0 && !isDeleted ){ | |
| 201 | 201 | /* File is believed to have changed but it is the same size. |
| 202 | 202 | ** Double check that it really has changed by looking at content. */ |
| 203 | 203 | assert( origSize==currentSize ); |
| 204 | 204 | db_ephemeral_blob(&q, 5, &origCksum); |
| 205 | 205 | if( sha1sum_file(zName, &fileCksum) ){ |
| 206 | 206 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -195,11 +195,11 @@ | |
| 195 | if( chnged==0 ){ |
| 196 | /* A file size change is definitive - the file has changed. No |
| 197 | ** need to check the mtime or sha1sum */ |
| 198 | chnged = 1; |
| 199 | } |
| 200 | }else if( (chnged==1 || chnged==2) && rid!=0 && !isDeleted ){ |
| 201 | /* File is believed to have changed but it is the same size. |
| 202 | ** Double check that it really has changed by looking at content. */ |
| 203 | assert( origSize==currentSize ); |
| 204 | db_ephemeral_blob(&q, 5, &origCksum); |
| 205 | if( sha1sum_file(zName, &fileCksum) ){ |
| 206 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -195,11 +195,11 @@ | |
| 195 | if( chnged==0 ){ |
| 196 | /* A file size change is definitive - the file has changed. No |
| 197 | ** need to check the mtime or sha1sum */ |
| 198 | chnged = 1; |
| 199 | } |
| 200 | }else if( chnged==1 && rid!=0 && !isDeleted ){ |
| 201 | /* File is believed to have changed but it is the same size. |
| 202 | ** Double check that it really has changed by looking at content. */ |
| 203 | assert( origSize==currentSize ); |
| 204 | db_ephemeral_blob(&q, 5, &origCksum); |
| 205 | if( sha1sum_file(zName, &fileCksum) ){ |
| 206 |