Skip to content

Commit 9511cbe

Browse files
author
tadelesh
committed
refine doc
1 parent f1af5c6 commit 9511cbe

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

packages/typespec-go/.scripts/sync-baseline.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,9 @@
77
// After tspcompile.js finishes regeneration it mirrors the locally
88
// generated test artifacts into this checkout, so developers can
99
// `git diff` / `git status` inside temp/baseline to inspect codegen
10-
// changes against the merged baseline. No separate `pnpm show-diff`
11-
// command is required.
10+
// changes against the merged baseline.
1211
//
1312
// Skip with TYPESPEC_GO_SKIP_BASELINE=1 (used by CI / offline runs).
14-
//
15-
// Conflict semantics (verified):
16-
// - Re-running sync while a previous mirror is still present (as untracked
17-
// files) does NOT raise a git conflict. `git reset --hard FETCH_HEAD` is a
18-
// no-op for purely-untracked paths and silently overwrites them when the
19-
// baseline tip starts tracking the same path. In both cases the mirror
20-
// runs again immediately afterwards (see tspcompile.js beforeExit hook),
21-
// so the working tree is rewritten to match the latest local emit. Net
22-
// effect on every successful run: working tree == baseline tip + local
23-
// emit overlay.
24-
// - Fetch / network failures are caught and downgraded to a WARN; the rest
25-
// of regeneration continues without baseline mirroring.
26-
// - Concurrent runs against the same checkout: the second invocation's
27-
// `git fetch` may fail with "shallow file has changed"; this is also
28-
// caught and downgraded to a WARN.
2913

3014
import { execFileSync } from "child_process";
3115
import { cpSync, existsSync, mkdirSync, readdirSync, rmSync, statSync, writeFileSync } from "fs";

0 commit comments

Comments
 (0)