README Source History Refs Reviews Compare Notes Search Review guide CI runs style: biome formatting for hermetic git identity helper
661d434a2cf0b0c2b2e4b090249b1493d49ac35e
Oliver Jan Krylow <oliver@bugabinga.net > · 21 Sep 2026
SSH signature · not checked
Browse files Compare with HEAD
Changed files (1) Diff layout Auto Unified Split
src/agent/runtime.int.test.ts Modified +10 / −11 text lines
22 22 const exec = promisify (execFile)const exec = promisify (execFile)25 - const GIT_IDENTITY = [31 - 'commit.gpgsign=false' ,25 + const GIT_IDENTITY = ['-c' , 'user.name=t' , '-c' , 'user.email=t@t' , '-c' , 'commit.gpgsign=false' ]34 27 test ('worktree: clone, ff-only when clean, preserved when dirty or ahead' , async () => {test ('worktree: clone, ff-only when clean, preserved when dirty or ahead' , async () => {35 28 const dir = await mkdtemp (join (tmpdir (), 'wt-' )) const dir = await mkdtemp (join (tmpdir (), 'wt-' ))59 52 await writeFile (join (work, 'b.txt' ), 'local\n' ) await writeFile (join (work, 'b.txt' ), 'local\n' )60 53 await writeFile (join (seed, 'a.txt' ), 'three\n' ) await writeFile (join (seed, 'a.txt' ), 'three\n' )61 - await exec ('git' , [... GIT_IDENTITY, 'commit' , '-am' , 'three' , '--author' , 't <t@t>' ], { cwd : seed } ) 54 + await exec ('git' , [... GIT_IDENTITY, 'commit' , '-am' , 'three' , '--author' , 't <t@t>' ], {62 57 await exec ('git' , ['push' , 'origin' , 'trunk' ], { cwd: seed }) await exec ('git' , ['push' , 'origin' , 'trunk' ], { cwd: seed })63 58 const s3 = await syncWorktree (work, remote, 'trunk' ) const s3 = await syncWorktree (work, remote, 'trunk' )64 59 assert.equal (s3.dirty, true ) assert.equal (s3.dirty, true )69 64 await exec ('git' , ['add' , '.' ], { cwd: work }) await exec ('git' , ['add' , '.' ], { cwd: work })70 - await exec ('git' , [... GIT_IDENTITY, 'commit' , '-m' , 'local' , '--author' , 't <t@t>' ], { cwd : work } ) 65 + await exec ('git' , [... GIT_IDENTITY, 'commit' , '-m' , 'local' , '--author' , 't <t@t>' ], {71 68 const s4 = await syncWorktree (work, remote, 'trunk' ) const s4 = await syncWorktree (work, remote, 'trunk' )72 69 assert.equal (s4.diverged, true ) assert.equal (s4.diverged, true )94 91 await writeFile (join (work, 'b.txt' ), 'local\n' ) await writeFile (join (work, 'b.txt' ), 'local\n' )95 92 await exec ('git' , ['add' , '.' ], { cwd: work }) await exec ('git' , ['add' , '.' ], { cwd: work })96 - await exec ('git' , [... GIT_IDENTITY, 'commit' , '-m' , 'local' , '--author' , 't <t@t>' ], { cwd : work } ) 93 + await exec ('git' , [... GIT_IDENTITY, 'commit' , '-m' , 'local' , '--author' , 't <t@t>' ], {97 96 const s2 = await readWorktreeState (work) const s2 = await readWorktreeState (work)98 97 assert.equal (s2.head, (await head ()).stdout.trim ()) assert.equal (s2.head, (await head ()).stdout.trim ())99 98 assert.notEqual (s2.head, s1.head) assert.notEqual (s2.head, s1.head)