Commit 204341c
Restore .git pointer file backup for agents that delete it
The worktree lock (#144) protects .git/worktrees/NAME/ from gc pruning.
But agents with Bash/Write access can still delete the .git POINTER FILE
from the worktree directory itself. This backup/restore catches that case.
Both protections together:
- Lock → prevents gc from pruning metadata directory
- Backup → restores pointer file if agent deletes it
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c2862b0 commit 204341c
1 file changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
94 | 107 | | |
95 | 108 | | |
96 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
97 | 121 | | |
98 | 122 | | |
99 | 123 | | |
| |||
0 commit comments