diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-10-10 11:11:46 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-10-10 11:11:46 +0300 |
commit | 1cf2b9a6b8ff2359f7fad099dcda5632289854a6 (patch) | |
tree | 5e57ffd2751b020b1428386c3563afa0294e4446 /app/models/repository.rb | |
parent | 4e963fed42ad518caa7353d361a38a1250c99c41 (diff) |
Make searching for commits case insensitive.
Fixes #21800.
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index bf59b74495b..4da1933c189 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -111,8 +111,10 @@ class Repository def find_commits_by_message(query, ref = nil, path = nil, limit = 1000, offset = 0) ref ||= root_ref - # Limited to 1000 commits for now, could be parameterized? - args = %W(#{Gitlab.config.git.bin_path} log #{ref} --pretty=%H --skip #{offset} --max-count #{limit} --grep=#{query}) + args = %W( + #{Gitlab.config.git.bin_path} log #{ref} --pretty=%H --skip #{offset} + --max-count #{limit} --grep=#{query} --regexp-ignore-case + ) args = args.concat(%W(-- #{path})) if path.present? git_log_results = Gitlab::Popen.popen(args, path_to_repo).first.lines.map(&:chomp) |