From 3ce671af66e67502993039a3a039dff808e2337c Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 3 Aug 2021 17:07:10 +0800 Subject: [PATCH] feature: cleanup files remained by last rebase --- src/Views/Widgets/Dashboard.xaml.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Views/Widgets/Dashboard.xaml.cs b/src/Views/Widgets/Dashboard.xaml.cs index de0226bc..03f06275 100644 --- a/src/Views/Widgets/Dashboard.xaml.cs +++ b/src/Views/Widgets/Dashboard.xaml.cs @@ -1049,6 +1049,9 @@ namespace SourceGit.Views.Widgets { var rebaseTempFolder = Path.Combine(repo.GitDir, "rebase-apply"); if (Directory.Exists(rebaseTempFolder)) Directory.Delete(rebaseTempFolder); + + var rebaseMergeFolder = Path.Combine(repo.GitDir, "rebase-merge"); + if (Directory.Exists(rebaseMergeFolder)) Directory.Delete(rebaseMergeFolder); return; } @@ -1097,6 +1100,12 @@ namespace SourceGit.Views.Widgets { if (mode == "rebase") { var rebaseTempFolder = Path.Combine(repo.GitDir, "rebase-apply"); if (Directory.Exists(rebaseTempFolder)) Directory.Delete(rebaseTempFolder); + + var rebaseFile = Path.Combine(repo.GitDir, "REBASE_HEAD"); + if (File.Exists(rebaseFile)) Directory.Delete(rebaseFile); + + var rebaseMergeFolder = Path.Combine(repo.GitDir, "rebase-merge"); + if (Directory.Exists(rebaseMergeFolder)) Directory.Delete(rebaseMergeFolder); } } }