feature: add a button in file histories view to reset selected file to selected commit

This commit is contained in:
leo 2024-08-24 12:06:38 +08:00
parent db8de81120
commit 9a68d70b29
No known key found for this signature in database
3 changed files with 39 additions and 1 deletions

View file

@ -79,6 +79,11 @@ namespace SourceGit.ViewModels
_repo.NavigateToCommit(commit.SHA);
}
public void ResetToSelectedRevision()
{
new Commands.Checkout(_repo.FullPath).FileWithRevision(_file, $"{_selectedCommit.SHA}");
}
private void RefreshViewContent()
{
if (_selectedCommit == null)