Commit bcba099
mingw: work around rename() failing on a read-only file
At least on _some_ APFS network shares, Git fails to rename the object
files because they are marked as read-only, because that has the effect
of setting the uchg flag on APFS, which then means the file can't be
renamed or deleted.
To work around that, when a rename failed, and the read-only flag is
set, try to turn it off and on again.
This fixes git-for-windows#4482
Signed-off-by: David Lomas <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 02a37cf commit bcba099
1 file changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2558 | 2558 | | |
2559 | 2559 | | |
2560 | 2560 | | |
2561 | | - | |
| 2561 | + | |
2562 | 2562 | | |
2563 | 2563 | | |
2564 | 2564 | | |
| |||
2571 | 2571 | | |
2572 | 2572 | | |
2573 | 2573 | | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
2579 | 2592 | | |
2580 | 2593 | | |
2581 | 2594 | | |
| |||
0 commit comments