feature: double-clicking tag will try to checkout (detached mode) the revision refered by selected tag (#1661)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-08-04 17:51:46 +08:00
parent 406db5a8a3
commit a4306fe6e3
3 changed files with 21 additions and 3 deletions

View File

@@ -1448,6 +1448,13 @@ namespace SourceGit.ViewModels
}
}
public async Task CheckoutTagAsync(Models.Tag tag)
{
var c = await new Commands.QuerySingleCommit(_fullpath, tag.SHA).GetResultAsync();
if (c != null)
_histories?.CheckoutBranchByCommit(c);
}
public async Task CompareBranchWithWorktree(Models.Branch branch)
{
if (_histories != null)