chore: covert run git info to trace

This commit is contained in:
2020-07-25 21:42:35 +08:00
parent ad732983be
commit f5b1f79c32

View File

@@ -1,7 +1,7 @@
use std::process::Command; use std::process::Command;
pub fn check_git_status() -> bool { pub fn check_git_status() -> bool {
info!("Run: git fetch --dry-run"); trace!("Run: git fetch --dry-run");
match Command::new("git").env("LANG", "en_US").args(&["fetch", "--dry-run"]).output() { match Command::new("git").env("LANG", "en_US").args(&["fetch", "--dry-run"]).output() {
Err(e) => { Err(e) => {
warn!("Error in run git fetch --dry-run: {}", e); warn!("Error in run git fetch --dry-run: {}", e);
@@ -18,7 +18,7 @@ pub fn check_git_status() -> bool {
}, },
}, },
} }
info!("Run: git status"); trace!("Run: git status");
match Command::new("git").env("LANG", "en_US").args(&["status"]).output() { match Command::new("git").env("LANG", "en_US").args(&["status"]).output() {
Err(e) => { Err(e) => {
warn!("Error in run git status: {}", e); warn!("Error in run git status: {}", e);
@@ -42,7 +42,7 @@ pub fn check_git_status() -> bool {
} }
pub fn get_git_hash() -> Option<String> { pub fn get_git_hash() -> Option<String> {
info!("Run: git rev-parse HEAD"); trace!("Run: git rev-parse HEAD");
match Command::new("git").args(&["rev-parse", "HEAD"]).output(){ match Command::new("git").args(&["rev-parse", "HEAD"]).output(){
Err(e) => { Err(e) => {
warn!("Error in run git rev-parse HEAD: {}", e); warn!("Error in run git rev-parse HEAD: {}", e);