From 3721483c2dbdd01ec6cbc6ba86ca84f8d7c2859a Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Sat, 12 Jul 2025 14:48:04 -0600 Subject: [PATCH] git::sync(): more helpful error message when merge fails --- src/git.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/git.rs b/src/git.rs index 63cb004..fe0446a 100644 --- a/src/git.rs +++ b/src/git.rs @@ -251,7 +251,7 @@ pub fn sync(dir: &std::path::Path, remote: &str, branch: &str) -> Result<(), Git if !result.status.success() { println!( "Sync failed! 'git log' error! Help, a human needs to fix the mess in {:?}", - dir + branch ); println!("stdout: {}", std::str::from_utf8(&result.stdout).unwrap()); println!("stderr: {}", std::str::from_utf8(&result.stderr).unwrap()); @@ -277,7 +277,7 @@ pub fn sync(dir: &std::path::Path, remote: &str, branch: &str) -> Result<(), Git if !result.status.success() { println!( "Sync failed! 'git log' error! Help, a human needs to fix the mess in {:?}", - dir + branch ); println!("stdout: {}", std::str::from_utf8(&result.stdout).unwrap()); println!("stderr: {}", std::str::from_utf8(&result.stderr).unwrap()); @@ -297,7 +297,7 @@ pub fn sync(dir: &std::path::Path, remote: &str, branch: &str) -> Result<(), Git if !result.status.success() { println!( "Sync failed! Merge error! Help, a human needs to fix the mess in {:?}", - dir + branch ); println!("stdout: {}", std::str::from_utf8(&result.stdout).unwrap()); println!("stderr: {}", std::str::from_utf8(&result.stderr).unwrap()); @@ -312,7 +312,7 @@ pub fn sync(dir: &std::path::Path, remote: &str, branch: &str) -> Result<(), Git if !result.status.success() { println!( "Sync failed! Push error! Help, a human needs to fix the mess in {:?}", - dir + branch ); println!("stdout: {}", std::str::from_utf8(&result.stdout).unwrap()); println!("stderr: {}", std::str::from_utf8(&result.stderr).unwrap());