From 951e08e9e0d57e5b53aba0f82e54ccaae2309e9d Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 20 Jul 2020 12:00:41 +0800 Subject: [PATCH] Ignore case to search commit --- SourceGit/UI/Histories.xaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SourceGit/UI/Histories.xaml.cs b/SourceGit/UI/Histories.xaml.cs index 647d37be..78014fe2 100644 --- a/SourceGit/UI/Histories.xaml.cs +++ b/SourceGit/UI/Histories.xaml.cs @@ -245,10 +245,10 @@ namespace SourceGit.UI { List found = new List(); foreach (var commit in cachedCommits) { - if (commit.Subject.IndexOf(search) >= 0 || - (commit.Author != null && commit.Author.Name == search) || - (commit.Committer != null && commit.Committer.Name == search) || - commit.Message.IndexOf(search) >= 0) { + if (commit.Subject.IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0 || + (commit.Author != null && commit.Author.Name.Equals(search, StringComparison.OrdinalIgnoreCase)) || + (commit.Committer != null && commit.Committer.Name.Equals(search, StringComparison.OrdinalIgnoreCase)) || + commit.Message.IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0) { found.Add(commit); } }