Fossil SCM

Handle exec-bit-only changes better in stash, mimicking what create_manifest() does.

stephan 2026-11-19 15:32 UTC trunk
Commit 80d48144157f55b14f0e6748889ad44217ab1c2b966a35e8f36c79137ff18468
1 file changed +6
--- src/stash.c
+++ src/stash.c
@@ -232,10 +232,16 @@
232232
blob_reset(&orig);
233233
blob_reset(&disk);
234234
db_bind_blob(&ins, ":content", &content);
235235
}
236236
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
237243
db_step(&ins);
238244
db_reset(&ins);
239245
fossil_free(zPath);
240246
blob_reset(&content);
241247
}
242248
--- 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

Keyboard Shortcuts

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