@@ -361,10 +361,10 @@ describe("git commit resolution", () => {
361361 await makeFakeGitRepo ( validRepo , {
362362 head : "ref: refs/heads/main\n" ,
363363 refs : {
364- "refs/heads/main" : "fedcba9876543210fedcba9876543210fedcba98 " ,
364+ "refs/heads/main" : "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " ,
365365 } ,
366366 } ) ;
367- expect ( resolveCommitHash ( { cwd : validRepo , env : { } } ) ) . toBe ( "fedcba9 " ) ;
367+ expect ( resolveCommitHash ( { cwd : validRepo , env : { } } ) ) . toBe ( "aaaaaaa " ) ;
368368 } ) ;
369369
370370 it ( "resolves refs from the git commondir in worktree layouts" , async ( ) => {
@@ -375,7 +375,7 @@ describe("git commit resolution", () => {
375375 await fs . mkdir ( commonGitDir , { recursive : true } ) ;
376376 const refPath = path . join ( commonGitDir , "refs" , "heads" , "main" ) ;
377377 await fs . mkdir ( path . dirname ( refPath ) , { recursive : true } ) ;
378- await fs . writeFile ( refPath , "76543210fedcba9876543210fedcba9876543210 \n" , "utf-8" ) ;
378+ await fs . writeFile ( refPath , "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \n" , "utf-8" ) ;
379379 await makeFakeGitRepo ( repoRoot , {
380380 gitdir : worktreeGitDir ,
381381 head : "ref: refs/heads/main\n" ,
@@ -384,7 +384,7 @@ describe("git commit resolution", () => {
384384
385385 const { resolveCommitHash } = await import ( "./git-commit.js" ) ;
386386
387- expect ( resolveCommitHash ( { cwd : repoRoot , env : { } } ) ) . toBe ( "7654321 " ) ;
387+ expect ( resolveCommitHash ( { cwd : repoRoot , env : { } } ) ) . toBe ( "bbbbbbb " ) ;
388388 } ) ;
389389
390390 it ( "reads full HEAD refs before parsing long branch names" , async ( ) => {
@@ -394,12 +394,12 @@ describe("git commit resolution", () => {
394394 await makeFakeGitRepo ( repoRoot , {
395395 head : `ref: ${ longRefName } \n` ,
396396 refs : {
397- [ longRefName ] : "0123456789abcdef0123456789abcdef01234567 " ,
397+ [ longRefName ] : "cccccccccccccccccccccccccccccccccccccccc " ,
398398 } ,
399399 } ) ;
400400
401401 const { resolveCommitHash } = await import ( "./git-commit.js" ) ;
402402
403- expect ( resolveCommitHash ( { cwd : repoRoot , env : { } } ) ) . toBe ( "0123456 " ) ;
403+ expect ( resolveCommitHash ( { cwd : repoRoot , env : { } } ) ) . toBe ( "ccccccc " ) ;
404404 } ) ;
405405} ) ;
0 commit comments