MCPcopy
hub / github.com/coder/mux / makeWorkspaceDirty

Function makeWorkspaceDirty

src/node/services/worktreeArchiveSnapshotService.test.ts:101–130  ·  view source on GitHub ↗
(fixture: TestFixture)

Source from the content-addressed store, hash-verified

99}
100
101async function makeWorkspaceDirty(fixture: TestFixture): Promise<void> {
102 await fs.writeFile(
103 path.join(fixture.workspacePath, "tracked.txt"),
104 "base\ncommit one\n",
105 "utf-8"
106 );
107 runGit(fixture.workspacePath, ["add", "tracked.txt"]);
108 runGit(fixture.workspacePath, ["commit", "-m", "commit one"]);
109
110 await fs.writeFile(
111 path.join(fixture.workspacePath, "tracked.txt"),
112 "base\ncommit one\ncommit two\n",
113 "utf-8"
114 );
115 runGit(fixture.workspacePath, ["add", "tracked.txt"]);
116 runGit(fixture.workspacePath, ["commit", "-m", "commit two"]);
117
118 await fs.writeFile(
119 path.join(fixture.workspacePath, "tracked.txt"),
120 "base\ncommit one\ncommit two\nstaged change\n",
121 "utf-8"
122 );
123 runGit(fixture.workspacePath, ["add", "tracked.txt"]);
124
125 await fs.writeFile(
126 path.join(fixture.workspacePath, "tracked.txt"),
127 "base\ncommit one\ncommit two\nstaged change\nunstaged change\n",
128 "utf-8"
129 );
130}
131
132async function renameWorkspaceWithoutRenamingBranch(
133 fixture: TestFixture,

Calls 2

runGitFunction · 0.85
writeFileMethod · 0.65

Tested by

no test coverage detected