Fossil SCM

Fix the file change detection logic so that it does not destroy merge history. Ticket [5a855f1bc6351f5].

drh 2012-01-11 17:48 trunk
Commit bcd718e924ad5c550d6c6e9240ce6ab08f9b6708
1 file changed +1 -1
+1 -1
--- src/vfile.c
+++ src/vfile.c
@@ -195,11 +195,11 @@
195195
if( chnged==0 ){
196196
/* A file size change is definitive - the file has changed. No
197197
** need to check the mtime or sha1sum */
198198
chnged = 1;
199199
}
200
- }else if( (chnged==1 || chnged==2) && rid!=0 && !isDeleted ){
200
+ }else if( chnged==1 && rid!=0 && !isDeleted ){
201201
/* File is believed to have changed but it is the same size.
202202
** Double check that it really has changed by looking at content. */
203203
assert( origSize==currentSize );
204204
db_ephemeral_blob(&q, 5, &origCksum);
205205
if( sha1sum_file(zName, &fileCksum) ){
206206
--- 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

Keyboard Shortcuts

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