From ac1bd7ca85c54031b0bb09770d9fa35bf8bbfc41 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 13 May 2025 14:22:41 +0800 Subject: [PATCH] ux: hide tag message if it's the same with its name (#1305) --- src/Commands/QueryTags.cs | 6 +++++- src/Views/TagsView.axaml | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Commands/QueryTags.cs b/src/Commands/QueryTags.cs index dd5eaa47..4b706439 100644 --- a/src/Commands/QueryTags.cs +++ b/src/Commands/QueryTags.cs @@ -29,13 +29,17 @@ namespace SourceGit.Commands continue; var name = subs[0].Substring(10); + var message = subs[5].Trim(); + if (!string.IsNullOrEmpty(message) && message.Equals(name, StringComparison.Ordinal)) + message = null; + tags.Add(new Models.Tag() { Name = name, IsAnnotated = subs[1].Equals("tag", StringComparison.Ordinal), SHA = string.IsNullOrEmpty(subs[3]) ? subs[2] : subs[3], CreatorDate = ulong.Parse(subs[4]), - Message = subs[5].Trim(), + Message = message, }); } diff --git a/src/Views/TagsView.axaml b/src/Views/TagsView.axaml index f8e6f8d7..94898bad 100644 --- a/src/Views/TagsView.axaml +++ b/src/Views/TagsView.axaml @@ -38,7 +38,7 @@ - + @@ -95,7 +95,7 @@ - +