Commit 33248b9
committed
refdb: remove a check-delete race when removing a loose ref
It does not help us to check whether the file exists before trying to
unlink it since it might be gone by the time unlink is called.
Instead try to remove it and handle the resulting error if it did not
exist.1 parent 40ffa07 commit 33248b9
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | 1284 | | |
1291 | | - | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1292 | 1289 | | |
| 1290 | + | |
| 1291 | + | |
1293 | 1292 | | |
1294 | 1293 | | |
1295 | 1294 | | |
| |||
1312 | 1311 | | |
1313 | 1312 | | |
1314 | 1313 | | |
| 1314 | + | |
1315 | 1315 | | |
1316 | 1316 | | |
1317 | 1317 | | |
| |||
0 commit comments