@@ -4993,6 +4993,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
49934993 yield * git ( cwd , [ "add" , "." ] ) ;
49944994 yield * git ( cwd , [ "commit" , "-m" , "Main" ] ) ;
49954995 const mainHead = yield * git ( cwd , [ "rev-parse" , "HEAD" ] ) ;
4996+ yield * git ( cwd , [ "branch" , "MERGE_HEAD" ] ) ;
49964997 if ( location === "worktree" ) {
49974998 const worktree = path . join ( yield * makeTmpDir ( ) , "linked" ) ;
49984999 yield * git ( cwd , [ "worktree" , "add" , "-b" , "linked" , worktree ] ) ;
@@ -5062,6 +5063,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
50625063 const cwd = yield * makeTmpDir ( ) ;
50635064 const { initialBranch } = yield * initRepoWithCommit ( cwd ) ;
50645065 const driver = yield * GitVcsDriver . GitVcsDriver ;
5066+ const path = yield * Path . Path ;
50655067 yield * git ( cwd , [ "checkout" , "-b" , "feature" ] ) ;
50665068 yield * writeTextFile ( cwd , "README.md" , "feature version\n" ) ;
50675069 yield * writeTextFile ( cwd , "picked.txt" , "picked\n" ) ;
@@ -5072,6 +5074,7 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
50725074 yield * writeTextFile ( cwd , "README.md" , "other version\n" ) ;
50735075 yield * git ( cwd , [ "commit" , "-am" , "Other" ] ) ;
50745076 const head = yield * git ( cwd , [ "rev-parse" , "HEAD" ] ) ;
5077+ yield * git ( cwd , [ "branch" , stateRef ] ) ;
50755078 const started = yield * driver . execute ( {
50765079 operation : "test.sequencer" ,
50775080 cwd,
@@ -5082,28 +5085,21 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
50825085 yield * writeTextFile ( cwd , "README.md" , "resolved version\n" ) ;
50835086 const gitDir = yield * git ( cwd , [ "rev-parse" , "--absolute-git-dir" ] ) ;
50845087 const names = [ "index" , stateRef , "MERGE_MSG" ] ;
5085- const before = names . map ( ( name ) => NodeFS . readFileSync ( ` ${ gitDir } / ${ name } ` ) ) ;
5088+ const before = names . map ( ( name ) => NodeFS . readFileSync ( path . join ( gitDir , name ) ) ) ;
50865089
5087- const result = yield * driver
5090+ const error = yield * driver
50885091 . commit ( cwd , "Partial" , "" , { stage : { filePaths : [ "picked.txt" ] } } )
5089- . pipe ( Effect . result ) ;
5090- if ( Result . isSuccess ( result ) ) {
5091- assert . fail ( `Selected ${ operation } commit succeeded` ) ;
5092- } else {
5093- assert . include (
5094- result . failure . detail ,
5095- `Cannot commit selected files during a ${ operation } ` ,
5096- ) ;
5097- }
5092+ . pipe ( Effect . flip ) ;
5093+ assert . include ( error . detail , `Cannot commit selected files during a ${ operation } ` ) ;
50985094 assert . deepEqual (
5099- names . map ( ( name ) => NodeFS . readFileSync ( ` ${ gitDir } / ${ name } ` ) ) ,
5095+ names . map ( ( name ) => NodeFS . readFileSync ( path . join ( gitDir , name ) ) ) ,
51005096 before ,
51015097 ) ;
51025098 assert . equal ( yield * git ( cwd , [ "rev-parse" , "HEAD" ] ) , head ) ;
51035099
51045100 yield * driver . commit ( cwd , "Finish" , "" , { stage : { } } ) ;
51055101 assert . equal ( yield * git ( cwd , [ "show" , "-s" , "--format=%an" , "HEAD" ] ) , author ) ;
5106- assert . isFalse ( NodeFS . existsSync ( ` ${ gitDir } / ${ stateRef } ` ) ) ;
5102+ assert . isFalse ( NodeFS . existsSync ( path . join ( gitDir , stateRef ) ) ) ;
51075103 } ) ,
51085104 ) ;
51095105
0 commit comments