From fb1c17426864aa633a6ebd065d21e9c6a954f584 Mon Sep 17 00:00:00 2001 From: Mihir Date: Tue, 9 Jan 2024 20:40:25 +0530 Subject: [PATCH] Add -F to commit search to treat keywords as strings --- modules/git/repo_commit.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index ccb3eb4adef0..a69229055ffe 100644 --- a/modules/git/repo_commit.go +++ b/modules/git/repo_commit.go @@ -142,6 +142,9 @@ func (repo *Repository) searchCommits(id ObjectID, opts SearchCommitsOptions) ([ cmd.AddArguments("--all") } + // interpret search string keywords as string instead of regex + cmd.AddArguments("-F") + // add remaining keywords from search string // note this is done only for command created above for _, v := range opts.Keywords {