diff --git a/src/Commands/QueryCommits.cs b/src/Commands/QueryCommits.cs index 6318f331..312c068f 100644 --- a/src/Commands/QueryCommits.cs +++ b/src/Commands/QueryCommits.cs @@ -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) { diff --git a/src/Models/Commit.cs b/src/Models/Commit.cs index 9bc7f0c3..f015130a 100644 --- a/src/Models/Commit.cs +++ b/src/Models/Commit.cs @@ -8,7 +8,8 @@ namespace SourceGit.Models { public enum CommitSearchMethod { - ByUser, + ByAuthor, + ByCommitter, ByMessage, ByFile, } diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 5143fc37..b771d080 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -583,10 +583,11 @@ REMOTES REMOTE HINZUFÜGEN Commit suchen + Autor + Committer Dateiname Commit-Nachricht SHA - Autor & Committer Aktueller Branch Zeige Tags als Baum ÜBERSPRINGEN diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index a07de46b..3cfff3d0 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -580,10 +580,11 @@ REMOTES ADD REMOTE Search Commit + Author + Committer File Message SHA - Author & Committer Current Branch Show Tags as Tree SKIP diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 74b2f224..8e470eb6 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -584,10 +584,11 @@ REMOTOS AÑADIR REMOTO Buscar Commit + Autor + Committer Archivo Mensaje SHA - Autor & Committer Rama Actual Mostrar Etiquetas como Árbol OMITIR diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index e4bb9c26..71dab9dd 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -560,10 +560,11 @@ DEPOTS DISTANTS AJOUTER DEPOT DISTANT Rechercher un commit + Auteur + Committer Fichier Message SHA - Auteur & Committer Branche actuelle Voir les Tags en tant qu'arbre Statistiques diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index 72e2aa28..c986c133 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -552,10 +552,11 @@ REMOTI AGGIUNGI REMOTO Cerca Commit + Autore + Committente File Messaggio SHA - Autore & Committente Branch Corrente Mostra Tag come Albero Statistiche diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index 8b17bdaf..e0fdcce0 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -579,10 +579,11 @@ REMOTOS ADICIONAR REMOTO Pesquisar Commit + Autor + Committer Arquivo Mensagem SHA - Autor & Committer Branch Atual Exibir Tags como Árvore Estatísticas diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 75650a28..690512e8 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -585,10 +585,11 @@ ВНЕШНИЕ РЕПОЗИТОРИИ ДОБАВИТЬ ВНЕШНИЙ РЕПОЗИТОРИЙ Поиск ревизии + Автор + исполнитель Файл Сообщение SHA - Автор и исполнитель Текущая ветка Показывать метки как катлог ПРОПУСТИТЬ diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 3c087a91..d12fa07c 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -584,10 +584,11 @@ 远程列表 添加远程 查找提交 + 作者 + 提交者 文件 提交信息 提交指纹 - 作者及提交者 仅在当前分支中查找 以树型结构展示 跳过此提交 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 4697541d..6be685bb 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -583,10 +583,11 @@ 遠端列表 新增遠端 搜尋提交 + 作者 + 提交者 檔案 提交訊息 提交編號 - 作者及提交者 僅搜尋目前分支 以樹型結構展示 跳過此提交 diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 7f619f1e..4a606c9e 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -733,12 +733,15 @@ namespace SourceGit.ViewModels visible.Add(commit); break; case 1: - visible = new Commands.QueryCommits(_fullpath, _searchCommitFilter, Models.CommitSearchMethod.ByUser, _onlySearchCommitsInCurrentBranch).Result(); + visible = new Commands.QueryCommits(_fullpath, _searchCommitFilter, Models.CommitSearchMethod.ByAuthor, _onlySearchCommitsInCurrentBranch).Result(); break; case 2: - visible = new Commands.QueryCommits(_fullpath, _searchCommitFilter, Models.CommitSearchMethod.ByMessage, _onlySearchCommitsInCurrentBranch).Result(); + visible = new Commands.QueryCommits(_fullpath, _searchCommitFilter, Models.CommitSearchMethod.ByCommitter, _onlySearchCommitsInCurrentBranch).Result(); break; case 3: + visible = new Commands.QueryCommits(_fullpath, _searchCommitFilter, Models.CommitSearchMethod.ByMessage, _onlySearchCommitsInCurrentBranch).Result(); + break; + case 4: visible = new Commands.QueryCommits(_fullpath, _searchCommitFilter, Models.CommitSearchMethod.ByFile, _onlySearchCommitsInCurrentBranch).Result(); break; } @@ -2382,7 +2385,7 @@ namespace SourceGit.ViewModels private bool _isSearching = false; private bool _isSearchLoadingVisible = false; private bool _isSearchCommitSuggestionOpen = false; - private int _searchCommitFilterType = 2; + private int _searchCommitFilterType = 3; private bool _onlySearchCommitsInCurrentBranch = false; private string _searchCommitFilter = string.Empty; private List _searchedCommits = new List(); diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml index 00f9f6ce..a3aa6f25 100644 --- a/src/Views/Repository.axaml +++ b/src/Views/Repository.axaml @@ -479,7 +479,8 @@ SelectedIndex="{Binding SearchCommitFilterType, Mode=TwoWay}"> - + +