fix: searching by Author & Committer does not work when the committer is different with author

This commit is contained in:
leo 2025-01-23 16:11:07 +08:00
parent 620f411e99
commit e242119a03
No known key found for this signature in database
13 changed files with 34 additions and 16 deletions

View file

@ -18,9 +18,13 @@ namespace SourceGit.Commands
{
string search = onlyCurrentBranch ? string.Empty : "--branches --remotes ";
if (method == Models.CommitSearchMethod.ByUser)
if (method == Models.CommitSearchMethod.ByAuthor)
{
search += $"-i --author=\"{filter}\" --committer=\"{filter}\"";
search += $"-i --author=\"{filter}\"";
}
else if (method == Models.CommitSearchMethod.ByCommitter)
{
search += $"-i --committer=\"{filter}\"";
}
else if (method == Models.CommitSearchMethod.ByFile)
{