File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -899,6 +899,14 @@ fn git_initialize_repo() -> TempDir {
899
899
. wait ( )
900
900
. expect ( "Failed to wait on `git init`." ) ;
901
901
902
+ Command :: new ( "git" )
903
+ . args ( [ "branch" , "-M" , "main" ] )
904
+ . current_dir ( & dir)
905
+ . spawn ( )
906
+ . expect ( "Failed to execute `git branch`." )
907
+ . wait ( )
908
+ . expect ( "Failed to wait on `git branch`." ) ;
909
+
902
910
Command :: new ( "git" )
903
911
. args ( [ "config" , "--local" , "user.name" , "test" ] )
904
912
. current_dir ( & dir)
@@ -1224,7 +1232,7 @@ fn test_git_repo_head_ref() {
1224
1232
1225
1233
// Test on a branch (should succeed)
1226
1234
let head_ref = git_repo_head_ref ( & repo) . expect ( "Should get branch reference" ) ;
1227
- assert_eq ! ( head_ref, "master " ) ;
1235
+ assert_eq ! ( head_ref, "main " ) ;
1228
1236
1229
1237
// Test in detached HEAD state (should fail)
1230
1238
let head_commit = repo. head ( ) . unwrap ( ) . target ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments