Add git_utils.rb

This is a file storing a GitUtils utility module that contains a useful
GitUtils::exit_if_not_in_git_repo helper method. This method is now used
in git-grep-blame.rb

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
git-grep-blame: handle case where git-grep matches binary file

In the case where a binary file contains what we are trying to git-grep,
the regular expression that tries to match the line will fail. We then
try to call the `each` method on a nil object, which results in an
exception.

This patch checks if there was a match between the regular expression
and the line of git-grep output before carrying on.

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
git-grep-filter: `git grep -n` with chained `grep -v`

As explained in the title of this message. Additional arguments after
the first argument are used to filter off lines which contain that
argument. Therefore, any remaining lines are those in the repository
which match ARGV[0], but do not match the remaining ARGV.

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
git-grep-filter: clarify usage of optional arguments

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>