git: Use correct file mode when staging (#41900)

Closes #28667

Release Notes:

- Fixed git not preserving file mode when committing. Now if an input file is executable it will be preserved when committed with Zed.

---------

Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <bhuminjaysoni@gmail.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
This commit is contained in:
Bhuminjay Soni
2025-11-26 09:01:20 +00:00
committed by GitHub
co-authored by Jakub Konka
parent 00e93bfa11
commit 425d4c73f3
7 changed files with 126 additions and 3 deletions
Generated
+10
View File
@@ -6406,6 +6406,7 @@ dependencies = [
"git",
"gpui",
"ignore",
"is_executable",
"libc",
"log",
"notify 8.2.0",
@@ -8436,6 +8437,15 @@ dependencies = [
"once_cell",
]
[[package]]
name = "is_executable"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baabb8b4867b26294d818bf3f651a454b6901431711abb96e296245888d6e8c4"
dependencies = [
"windows-sys 0.60.2",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"