File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -125,11 +125,15 @@ impl Fixtures {
125125 }
126126 } else {
127127 fs:: create_dir_all ( & index) . unwrap ( ) ;
128- git ( "init --bare" ) ;
128+ // git 2.48.0 changed the behavior of setting HEAD when doing a
129+ // fetch, so let's just force it to match
130+ // crates.io-index-archive's default branch. This also accounts
131+ // for users who may override init.defaultBranch.
132+ git ( "init --bare --initial-branch=main" ) ;
129133 git ( "remote add origin https://github.com/rust-lang/crates.io-index-archive" ) ;
130134 }
131135 git ( & format ! ( "fetch origin {}" , CRATES_IO_COMMIT ) ) ;
132- git ( "branch -f master FETCH_HEAD" ) ;
136+ git ( "branch -f main FETCH_HEAD" ) ;
133137 }
134138
135139 /// This unpacks the compressed workspace skeletons into tmp/workspaces.
You can’t perform that action at this time.
0 commit comments