use fancy chat tech

This commit is contained in:
Quaternions 2024-01-11 02:33:57 -08:00
parent d06861daa2
commit e722f79928

View File

@ -712,16 +712,16 @@ fn write_commit(config:WriteCommitConfig,b:AResult<(AssetVersion,DecompiledConte
};
let tree=repo.find_tree(tree_id)?;
match repo.revwalk().unwrap().next(){
Some(Ok(commit_id))=>repo.commit(
match repo.head(){
Ok(reference)=>repo.commit(
Some("HEAD"),//update_ref
&sig,//author
&sig,//commiter
&format!("v{}", asset_version.assetVersionNumber),//message
&tree,//tree (basically files)
&[&repo.find_commit(commit_id)?],//parents
&[&reference.peel_to_commit()?],//parents
).expect("commit failed"),
None=>repo.commit(
Err(_)=>repo.commit(
Some("HEAD"),//update_ref
&sig,//author
&sig,//commiter
@ -729,7 +729,6 @@ fn write_commit(config:WriteCommitConfig,b:AResult<(AssetVersion,DecompiledConte
&tree,//tree (basically files)
&[],//parents
).expect("commit failed"),
Some(Err(e))=>Err(e)?,
};
//commit
@ -779,7 +778,7 @@ async fn decompile_history_into_git(config:DecompileHistoryConfig)->AResult<()>{
write_scripts:config.write_scripts,
},b,&repo){
Ok(())=>(),
Err(e)=>println!("download/unzip/decompile/write error: {}",e),
Err(e)=>println!("download/unzip/decompile/write/commit error: {}",e),
}
}).await;
Ok(())