Fossil SCM

Fix to "fossil patch apply": When the patch involves an ADDED_BY_MERGE file, take care to not truncate the content of that file.

drh 2024-08-01 13:23 trunk
Commit 764c50aeff3cf7f26a96099c8015471ec6be4998a77fe7b3004e7b5884be5b73
1 file changed +1
--- src/patch.c
+++ src/patch.c
@@ -531,10 +531,11 @@
531531
if( blob_size(&data) ){
532532
blob_uncompress(&data, &data);
533533
}
534534
if( blob_size(&data)==0 ){
535535
/* No changes to the file */
536
+ continue;
536537
}else if( zHash ){
537538
Blob basis;
538539
int rid = fast_uuid_to_rid(zHash);
539540
int outSize, sz;
540541
char *aOut;
541542
--- src/patch.c
+++ src/patch.c
@@ -531,10 +531,11 @@
531 if( blob_size(&data) ){
532 blob_uncompress(&data, &data);
533 }
534 if( blob_size(&data)==0 ){
535 /* No changes to the file */
 
536 }else if( zHash ){
537 Blob basis;
538 int rid = fast_uuid_to_rid(zHash);
539 int outSize, sz;
540 char *aOut;
541
--- src/patch.c
+++ src/patch.c
@@ -531,10 +531,11 @@
531 if( blob_size(&data) ){
532 blob_uncompress(&data, &data);
533 }
534 if( blob_size(&data)==0 ){
535 /* No changes to the file */
536 continue;
537 }else if( zHash ){
538 Blob basis;
539 int rid = fast_uuid_to_rid(zHash);
540 int outSize, sz;
541 char *aOut;
542

Keyboard Shortcuts

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