update deleted or moved files

This commit is contained in:
Quaternions 2024-01-11 20:45:53 -08:00
parent b9eaefe056
commit 67048cccf6

View File

@ -751,10 +751,12 @@ async fn write_commit(config:WriteCommitConfig,b:Result<AResult<(AssetVersion,De
let sig=git2::Signature::new(config.git_committer_name.as_str(),config.git_committer_email.as_str(),&git2::Time::new(date.timestamp(),0)).unwrap();
let tree_id={
let mut tree_index = repo.index()?;
tree_index.add_all([config.output_folder].iter(),git2::IndexAddOption::DEFAULT,None)?;
tree_index.add_all([config.output_folder.as_path()].iter(),git2::IndexAddOption::DEFAULT,None)?;
if tree_index.len()==0{
println!("tree_index.len()==0");
return Ok(());
}else{
tree_index.update_all([config.output_folder.as_path()].iter(),None)?;
}
tree_index.write_tree()?
};