summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/git/repo_commit.go2
-rw-r--r--tests/integration/repo_commits_search_test.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go
index a69229055f..9c9ee7768f 100644
--- a/modules/git/repo_commit.go
+++ b/modules/git/repo_commit.go
@@ -143,7 +143,7 @@ func (repo *Repository) searchCommits(id ObjectID, opts SearchCommitsOptions) ([
}
// interpret search string keywords as string instead of regex
- cmd.AddArguments("-F")
+ cmd.AddArguments("--fixed-strings")
// add remaining keywords from search string
// note this is done only for command created above
diff --git a/tests/integration/repo_commits_search_test.go b/tests/integration/repo_commits_search_test.go
index 1c27b6db9d..74ac25c0f5 100644
--- a/tests/integration/repo_commits_search_test.go
+++ b/tests/integration/repo_commits_search_test.go
@@ -32,6 +32,7 @@ func TestRepoCommitsSearch(t *testing.T) {
testRepoCommitsSearch(t, "38a9cb", "")
testRepoCommitsSearch(t, "6e8e", "6e8eabd9a7")
testRepoCommitsSearch(t, "58e97", "58e97d1a24")
+ testRepoCommitsSearch(t, "[build]", "")
testRepoCommitsSearch(t, "author:alice", "6e8eabd9a7")
testRepoCommitsSearch(t, "author:alice 6e8ea", "6e8eabd9a7")
testRepoCommitsSearch(t, "committer:Tom", "58e97d1a24")