Skip to content

Commit 9698b66

Browse files
authored
Fix: Correct reset to parent revision functionality (#2125)
- 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.
1 parent 521159b commit 9698b66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ViewModels/CommitDetail.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Text.RegularExpressions;
@@ -316,13 +316,13 @@ public async Task ResetToParentRevisionAsync(Models.Change change)
316316

317317
await new Commands.Checkout(_repo.FullPath)
318318
.Use(log)
319-
.FileWithRevisionAsync(change.OriginalPath, _commit.SHA);
319+
.FileWithRevisionAsync(change.OriginalPath, $"{_commit.SHA}~1");
320320
}
321321
else
322322
{
323323
await new Commands.Checkout(_repo.FullPath)
324324
.Use(log)
325-
.FileWithRevisionAsync(change.Path, _commit.SHA);
325+
.FileWithRevisionAsync(change.Path, $"{_commit.SHA}~1");
326326
}
327327

328328
log.Complete();

0 commit comments

Comments
 (0)