-
-
Notifications
You must be signed in to change notification settings - Fork 957
Commit 1a04c15
committed
improve index mode for files with executable bit
The fix for #430 in bebc4f5 (Use correct mode for executable files,
2016年05月19日) is incomplete. It fails (in most cases) when files have
modes which are not exactly 0644 or 0755.
Git only cares whether the executable bit is set (or not). Ensure the
mode we set for the index is either 100644 or 100755 based on whether
the executable bit is set for the file owner. Do this similarly to how
upstream git does it in cache.h1.
Add a test covering various file modes to help catch regressions.
Fixes #1253
1 https://github.com/git/git/blob/v2.31.1/cache.h#L247 1 parent eae0e37 commit 1a04c15
2 files changed
+15
-3
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 | + | ||
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
| |||
115 | 116 |
| |
116 | 117 |
| |
117 | 118 |
| |
118 | - | ||
119 | + | ||
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | - | ||
2 | + | ||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 | - | ||
10 | + | ||
11 | + | ||
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
| |||
206 | 207 |
| |
207 | 208 |
| |
208 | 209 |
| |
210 | + | ||
211 | + | ||
212 | + | ||
213 | + | ||
214 | + | ||
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | ||
219 | + | ||
209 | 220 |
| |
210 | 221 |
| |
211 | 222 |
| |
|
0 commit comments