Fossil SCM
Handle exec-bit-only changes better in stash, mimicking what create_manifest() does.
Commit
80d48144157f55b14f0e6748889ad44217ab1c2b966a35e8f36c79137ff18468
Parent
bbc065696ca02b5…
1 file changed
+6
+6
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -232,10 +232,16 @@ | ||
| 232 | 232 | blob_reset(&orig); |
| 233 | 233 | blob_reset(&disk); |
| 234 | 234 | db_bind_blob(&ins, ":content", &content); |
| 235 | 235 | } |
| 236 | 236 | db_bind_int(&ins, ":islink", file_islink(zPath)); |
| 237 | +#if !defined(_WIN32) | |
| 238 | + /* vfile.isexe is the baseline's bit, so a stash would lose an | |
| 239 | + ** exec-bit change. Take the file's own, as create_manifest() does. | |
| 240 | + ** On Windows, file_isexe() is always false, so keep vfile's. */ | |
| 241 | + if( !deleted ) db_bind_int(&ins, ":isexe", file_isexe(zPath, RepoFILE)); | |
| 242 | +#endif | |
| 237 | 243 | db_step(&ins); |
| 238 | 244 | db_reset(&ins); |
| 239 | 245 | fossil_free(zPath); |
| 240 | 246 | blob_reset(&content); |
| 241 | 247 | } |
| 242 | 248 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -232,10 +232,16 @@ | |
| 232 | blob_reset(&orig); |
| 233 | blob_reset(&disk); |
| 234 | db_bind_blob(&ins, ":content", &content); |
| 235 | } |
| 236 | db_bind_int(&ins, ":islink", file_islink(zPath)); |
| 237 | db_step(&ins); |
| 238 | db_reset(&ins); |
| 239 | fossil_free(zPath); |
| 240 | blob_reset(&content); |
| 241 | } |
| 242 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -232,10 +232,16 @@ | |
| 232 | blob_reset(&orig); |
| 233 | blob_reset(&disk); |
| 234 | db_bind_blob(&ins, ":content", &content); |
| 235 | } |
| 236 | db_bind_int(&ins, ":islink", file_islink(zPath)); |
| 237 | #if !defined(_WIN32) |
| 238 | /* vfile.isexe is the baseline's bit, so a stash would lose an |
| 239 | ** exec-bit change. Take the file's own, as create_manifest() does. |
| 240 | ** On Windows, file_isexe() is always false, so keep vfile's. */ |
| 241 | if( !deleted ) db_bind_int(&ins, ":isexe", file_isexe(zPath, RepoFILE)); |
| 242 | #endif |
| 243 | db_step(&ins); |
| 244 | db_reset(&ins); |
| 245 | fossil_free(zPath); |
| 246 | blob_reset(&content); |
| 247 | } |
| 248 |