Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Commit

Permalink
Merge 0ae9d4c into 28ba79c
Browse files Browse the repository at this point in the history
  • Loading branch information
jacargentina committed May 17, 2013
2 parents 28ba79c + 0ae9d4c commit 0600a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grit/repo.rb
Expand Up @@ -715,7 +715,7 @@ def rename(name)

def grep(searchtext, contextlines = 3, branch = 'master')
context_arg = '-C ' + contextlines.to_s
result = git.native(:grep, {}, '-n', '-E', '-i', '-z', '--heading', '--break', context_arg, searchtext, branch).force_encoding('UTF-8')
result = git.native(:grep, {}, '-n', '-E', '-i', '-z', '--heading', '--break', context_arg, searchtext, branch).encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
greps = []
filematches = result.split("\n\n")
filematches.each do |filematch|
Expand Down

0 comments on commit 0600a03

Please sign in to comment.