From 7165cc7caeeb823b7e79c8ce3ba19298e680d341 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 16 Nov 2012 10:05:57 +0000 Subject: [PATCH] repo git: don't abort rebase on startup, fix conflicts instead. fixes #1058 --- SparkleLib/Git/SparkleRepoGit.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 2fb55f62..82e7cc5a 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -38,14 +38,19 @@ namespace SparkleLib.Git { get { if (string.IsNullOrEmpty (this.cached_branch)) { string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine (); - SparkleGit git; if (Directory.Exists (rebase_apply_path)) { - git = new SparkleGit (LocalPath, "rebase --abort"); - git.StartAndWaitForExit (); + while (HasLocalChanges) { + try { + ResolveConflict (); + + } catch (IOException e) { + SparkleLogger.LogInfo ("Git", Name + " | Failed to resolve conflict, trying again... (" + e.Message + ")"); + } + } } - git = new SparkleGit (LocalPath, "rev-parse --abbrev-ref HEAD"); + SparkleGit git = new SparkleGit (LocalPath, "rev-parse --abbrev-ref HEAD"); this.cached_branch = git.StartAndReadStandardOutput (); }