From 2213b5e1ce091ab3a13d5f44fa896bb6ad8c794d Mon Sep 17 00:00:00 2001 From: Gadfly Date: Fri, 13 Feb 2026 09:53:20 +0800 Subject: [PATCH] Fix: Correct reset to parent revision functionality - Updated `ResetToParentRevisionAsync` to use `$"{_commit.SHA}~1"` for parent revision. - Updated `ResetMultipleToParentRevisionAsync` to use `$"{_commit.SHA}~1"` for consistency. - Removed UTF-8 BOM from `CommitDetail.cs` to ensure proper file encoding. --- src/ViewModels/CommitDetail.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ViewModels/CommitDetail.cs b/src/ViewModels/CommitDetail.cs index 399382c3d..783a7822b 100644 --- a/src/ViewModels/CommitDetail.cs +++ b/src/ViewModels/CommitDetail.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; @@ -316,13 +316,13 @@ public async Task ResetToParentRevisionAsync(Models.Change change) await new Commands.Checkout(_repo.FullPath) .Use(log) - .FileWithRevisionAsync(change.OriginalPath, _commit.SHA); + .FileWithRevisionAsync(change.OriginalPath, $"{_commit.SHA}~1"); } else { await new Commands.Checkout(_repo.FullPath) .Use(log) - .FileWithRevisionAsync(change.Path, _commit.SHA); + .FileWithRevisionAsync(change.Path, $"{_commit.SHA}~1"); } log.Complete();