Fix failure in updating GIT index of cargo registry server (#33628)

This commit is contained in:
Pankaj Garg 2023-10-10 11:48:52 -07:00 committed by GitHub
parent 509d6acd2b
commit ad949b21b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,11 @@ impl DummyGitIndex {
if empty || config_written || new_symlink || new_git_symlink {
let mut index = repository.index().expect("cannot get the Index file");
index
.add_all(["*"].iter(), IndexAddOption::DEFAULT, None)
.add_all(
["config.json", "index"].iter(),
IndexAddOption::DEFAULT,
None,
)
.expect("Failed to add modified files to git index");
index.write().expect("Failed to update the git index");