Commit 6d5f247
committed
🤖 fix: minimize git lock conflicts with smart fetch
The background git fetch polling was creating locks that conflicted with
terminal commands and agent git operations.
Now uses a smarter approach:
1. git ls-remote to get remote SHA (no lock, network only)
2. git cat-file -e to check if SHA exists locally (no lock)
3. If local: skip fetch entirely (no lock needed)
4. If not local: fetch to get new commits (lock, but rare)
This eliminates locks in the common case where the remote SHA is already
local (e.g., IDE or user already fetched). Locks only occur when there
are genuinely new remote commits that haven't been fetched by anyone.
_Generated with `mux`_1 parent 4d61f89 commit 6d5f247
1 file changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
97 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
98 | 127 | | |
99 | 128 | | |
100 | 129 | | |
| |||
0 commit comments