From 551021520a875475966dacdb81a4576edc02d397 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 17 Nov 2020 19:56:18 +0800 Subject: [PATCH] feature: auto remove .git/rebase-apply when continue finished --- src/UI/Dashboard.xaml.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UI/Dashboard.xaml.cs b/src/UI/Dashboard.xaml.cs index 810bfcdb..9b60dc35 100644 --- a/src/UI/Dashboard.xaml.cs +++ b/src/UI/Dashboard.xaml.cs @@ -236,8 +236,6 @@ namespace SourceGit.UI { MakeBranchNode(b, remote.Children, folders, states, "remotes"); } else { - /// 对于 SUBMODULE HEAD 出于游离状态(detached on commit id) - /// 此时,分支既不是 本地分支,也不是远程分支 isDetached = b.IsCurrent; } } @@ -418,6 +416,7 @@ namespace SourceGit.UI { } else { var cherryPickMerge = Path.Combine(repo.GitDir, "CHERRY_PICK_HEAD"); var rebaseMerge = Path.Combine(repo.GitDir, "REBASE_HEAD"); + var rebaseApply = Path.Combine(repo.GitDir, "rebase-apply"); var revertMerge = Path.Combine(repo.GitDir, "REVERT_HEAD"); var otherMerge = Path.Combine(repo.GitDir, "MERGE_HEAD"); @@ -429,6 +428,8 @@ namespace SourceGit.UI { File.Delete(revertMerge); } else if (File.Exists(otherMerge)) { File.Delete(otherMerge); + } else if (Directory.Exists(rebaseApply)) { + Directory.Delete(rebaseApply); } repo.Branches(true);