mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-04-29 21:29:46 +08:00
rustfmt: max-width=120
This commit is contained in:
@@ -17,8 +17,7 @@ pub fn commit(message: String, allow_empty: bool) {
|
||||
let current_head = head::current_head();
|
||||
let current_commit_hash = head::current_head_commit();
|
||||
|
||||
let mut commit =
|
||||
commit::Commit::new(&index, vec![current_commit_hash.clone()], message.clone());
|
||||
let mut commit = commit::Commit::new(&index, vec![current_commit_hash.clone()], message.clone());
|
||||
let commit_hash = commit.save();
|
||||
head::update_head_commit(&commit_hash);
|
||||
|
||||
@@ -26,11 +25,9 @@ pub fn commit(message: String, allow_empty: bool) {
|
||||
head::Head::Branch(branch_name) => {
|
||||
println!("commit to [{:?}] message{:?}", branch_name, message)
|
||||
}
|
||||
head::Head::Detached(commit_hash) => println!(
|
||||
"Detached HEAD commit {:?} message{:?}",
|
||||
commit_hash[0..7].to_string(),
|
||||
message
|
||||
),
|
||||
head::Head::Detached(commit_hash) => {
|
||||
println!("Detached HEAD commit {:?} message{:?}", commit_hash[0..7].to_string(), message)
|
||||
}
|
||||
}
|
||||
|
||||
println!("commit hash: {:?}", commit_hash);
|
||||
|
||||
Reference in New Issue
Block a user