Skip to content

Commit 97adfec

Browse files
refactor(server): keep the status fetch's gc comment and note FETCH_HEAD on its flag
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent f8539a4 commit 97adfec

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/server/src/vcs/GitVcsDriverCore.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,17 +1299,17 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
12991299
) {
13001300
const fetchCwd =
13011301
path.basename(gitCommonDir) === ".git" ? path.dirname(gitCommonDir) : gitCommonDir;
1302-
// `--no-auto-gc` (`--no-auto-maintenance` in a spelling older Git knows) skips `git gc
1303-
// --auto`; on a broken repository that gc fails and reruns per fetch, piling up `tmp_pack_*`.
1304-
// `--no-write-fetch-head`: Git rewrites FETCH_HEAD without a lock, so a poll overlapping the
1305-
// user's `git pull` would leave it several branches to merge and fail that pull.
1302+
// `--no-auto-gc` keeps this poll from starting `git gc --auto`. When that gc fails, for
1303+
// example on a repository with missing objects, Git retries it on every fetch and leaves a
1304+
// full-size `tmp_pack_*` behind each time, so a background poll could fill the disk.
13061305
const args = [
13071306
"--git-dir",
13081307
gitCommonDir,
13091308
"fetch",
13101309
"--quiet",
13111310
"--no-tags",
13121311
"--no-auto-gc",
1312+
// FETCH_HEAD is written without a lock; overlapping a user's `git pull` makes that pull fail.
13131313
"--no-write-fetch-head",
13141314
"--",
13151315
remoteName,

0 commit comments

Comments
 (0)