def grep(string, opts = {})
      opts[:object] ||= 'HEAD'

      grep_opts = ['-n']
      grep_opts << '-i' if opts[:ignore_case]
      grep_opts << '-v' if opts[:invert_match]
      grep_opts << '-E' if opts[:extended_regexp]
      grep_opts << '-e'
      grep_opts << string
      grep_opts << opts[:object] if opts[:object].is_a?(String)
      grep_opts.push('--', opts[:path_limiter]) if opts[:path_limiter].is_a?(String)
      grep_opts.push('--', *opts[:path_limiter]) if opts[:path_limiter].is_a?(Array)

      hsh = {}
      begin
        command_lines('grep', *grep_opts).each do |line|
          if m = /(.*?)\:(\d+)\:(.*)/.match(line)
            hsh[m[1]] ||= []
            hsh[m[1]] << [m[2].to_i, m[3]]
          end
        end
      rescue Git::FailedError => e
        raise unless e.result.status.exitstatus == 1 && e.result.stderr == ''
      end
      hsh
    end
returns hash
[tree-ish] = [[line_no, match], [line_no, match2]]
[tree-ish] = [[line_no, match], [line_no, match2]]