update deleted or moved files
This commit is contained in:
parent
b9eaefe056
commit
67048cccf6
@ -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 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 tree_id={
|
||||||
let mut tree_index = repo.index()?;
|
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{
|
if tree_index.len()==0{
|
||||||
println!("tree_index.len()==0");
|
println!("tree_index.len()==0");
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
}else{
|
||||||
|
tree_index.update_all([config.output_folder.as_path()].iter(),None)?;
|
||||||
}
|
}
|
||||||
tree_index.write_tree()?
|
tree_index.write_tree()?
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user