From cd6f69ef43f47dd677993cc5f549a65a9ebc5585 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 21 Nov 2012 09:22:29 +0000 Subject: [PATCH] repo git: don't try to resolve conflicts when a rebase failed due to locked files --- SparkleLib/Git/SparkleRepoGit.cs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 00fc6f76..3facc7c2 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -472,22 +472,23 @@ namespace SparkleLib.Git { git.StartAndWaitForExit (); return false; - } - - SparkleLogger.LogInfo ("Git", Name + " | Conflict detected, trying to get out..."); - string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine (); - while (Directory.Exists (rebase_apply_path) && HasLocalChanges) { - try { - ResolveConflict (); + } else { + SparkleLogger.LogInfo ("Git", Name + " | Conflict detected, trying to get out..."); + string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine (); + + while (Directory.Exists (rebase_apply_path) && HasLocalChanges) { + try { + ResolveConflict (); - } catch (IOException e) { - SparkleLogger.LogInfo ("Git", Name + " | Failed to resolve conflict, trying again... (" + e.Message + ")"); + } catch (IOException e) { + SparkleLogger.LogInfo ("Git", Name + " | Failed to resolve conflict, trying again... (" + e.Message + ")"); + } } - } - SparkleLogger.LogInfo ("Git", Name + " | Conflict resolved"); - OnConflictResolved (); + SparkleLogger.LogInfo ("Git", Name + " | Conflict resolved"); + OnConflictResolved (); + } } git = new SparkleGit (LocalPath, "config core.ignorecase false");