MCPcopy Create free account
hub / github.com/ReviewStage/stage-cli / buildDiffArgs

Function buildDiffArgs

packages/cli/src/git.ts:66–81  ·  view source on GitHub ↗
(run: ChapterRunRow)

Source from the content-addressed store, hash-verified

64 return out === "" || out === DETACHED_HEAD ? null : out;
65 } catch {
66 return null;
67 }
68}
69
70/** Configured `user.name` for the repo, or null when unset. Used as a viewer-identity fallback. */
71export function readGitUserName(repoRoot: string): string | null {
72 try {
73 const out = execFileSync("git", ["-C", repoRoot, "config", "user.name"], {
74 encoding: "utf8",
75 stdio: ["ignore", "pipe", "ignore"],
76 }).trim();
77 return out || null;
78 } catch {
79 return null;
80 }
81}
82
83// View-time diffs must force the same a/ b/ prefixes generation-time getRawDiff
84// forces, so users with diff.noprefix=true get consistent patches.

Callers 1

diffRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected