Fossil SCM
Fix an assert() that fires if the "stash" command is used after having done an "rm". Ticket [3ce0ea97522581]
Commit
336e194c4d1e41a39fd788e038000c03aa8dc0f9
Parent
2cd0c7657f2fea5…
1 file changed
+1
+1
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -100,10 +100,11 @@ | ||
| 100 | 100 | if( rid==0 ){ |
| 101 | 101 | /* A new file */ |
| 102 | 102 | blob_read_from_file(&content, zPath); |
| 103 | 103 | db_bind_blob(&ins, ":content", &content); |
| 104 | 104 | }else if( deleted ){ |
| 105 | + blob_zero(&content); | |
| 105 | 106 | db_bind_null(&ins, ":content"); |
| 106 | 107 | }else{ |
| 107 | 108 | /* A modified file */ |
| 108 | 109 | Blob orig; |
| 109 | 110 | Blob disk; |
| 110 | 111 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -100,10 +100,11 @@ | |
| 100 | if( rid==0 ){ |
| 101 | /* A new file */ |
| 102 | blob_read_from_file(&content, zPath); |
| 103 | db_bind_blob(&ins, ":content", &content); |
| 104 | }else if( deleted ){ |
| 105 | db_bind_null(&ins, ":content"); |
| 106 | }else{ |
| 107 | /* A modified file */ |
| 108 | Blob orig; |
| 109 | Blob disk; |
| 110 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -100,10 +100,11 @@ | |
| 100 | if( rid==0 ){ |
| 101 | /* A new file */ |
| 102 | blob_read_from_file(&content, zPath); |
| 103 | db_bind_blob(&ins, ":content", &content); |
| 104 | }else if( deleted ){ |
| 105 | blob_zero(&content); |
| 106 | db_bind_null(&ins, ":content"); |
| 107 | }else{ |
| 108 | /* A modified file */ |
| 109 | Blob orig; |
| 110 | Blob disk; |
| 111 |