use fancy chat tech
This commit is contained in:
parent
d06861daa2
commit
e722f79928
11
src/main.rs
11
src/main.rs
@ -712,16 +712,16 @@ fn write_commit(config:WriteCommitConfig,b:AResult<(AssetVersion,DecompiledConte
|
|||||||
};
|
};
|
||||||
let tree=repo.find_tree(tree_id)?;
|
let tree=repo.find_tree(tree_id)?;
|
||||||
|
|
||||||
match repo.revwalk().unwrap().next(){
|
match repo.head(){
|
||||||
Some(Ok(commit_id))=>repo.commit(
|
Ok(reference)=>repo.commit(
|
||||||
Some("HEAD"),//update_ref
|
Some("HEAD"),//update_ref
|
||||||
&sig,//author
|
&sig,//author
|
||||||
&sig,//commiter
|
&sig,//commiter
|
||||||
&format!("v{}", asset_version.assetVersionNumber),//message
|
&format!("v{}", asset_version.assetVersionNumber),//message
|
||||||
&tree,//tree (basically files)
|
&tree,//tree (basically files)
|
||||||
&[&repo.find_commit(commit_id)?],//parents
|
&[&reference.peel_to_commit()?],//parents
|
||||||
).expect("commit failed"),
|
).expect("commit failed"),
|
||||||
None=>repo.commit(
|
Err(_)=>repo.commit(
|
||||||
Some("HEAD"),//update_ref
|
Some("HEAD"),//update_ref
|
||||||
&sig,//author
|
&sig,//author
|
||||||
&sig,//commiter
|
&sig,//commiter
|
||||||
@ -729,7 +729,6 @@ fn write_commit(config:WriteCommitConfig,b:AResult<(AssetVersion,DecompiledConte
|
|||||||
&tree,//tree (basically files)
|
&tree,//tree (basically files)
|
||||||
&[],//parents
|
&[],//parents
|
||||||
).expect("commit failed"),
|
).expect("commit failed"),
|
||||||
Some(Err(e))=>Err(e)?,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//commit
|
//commit
|
||||||
@ -779,7 +778,7 @@ async fn decompile_history_into_git(config:DecompileHistoryConfig)->AResult<()>{
|
|||||||
write_scripts:config.write_scripts,
|
write_scripts:config.write_scripts,
|
||||||
},b,&repo){
|
},b,&repo){
|
||||||
Ok(())=>(),
|
Ok(())=>(),
|
||||||
Err(e)=>println!("download/unzip/decompile/write error: {}",e),
|
Err(e)=>println!("download/unzip/decompile/write/commit error: {}",e),
|
||||||
}
|
}
|
||||||
}).await;
|
}).await;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user