[PATCH] get_maintainer.pl: teach git log to use --no-color

From: Richard Kennedy
Date: Fri Jan 22 2010 - 07:31:36 EST

When git has been set to always use color in .gitconfig then I get the
warning message

Bad divisor in main::vcs_assign: 0

This is caused by vcs_file_signoffs not matching any commits due to the
pattern not understand the colour codes. Fix this by telling git log to
never use colour.

Signed-off-by: Richard Kennedy <richard@xxxxxxxxxxxxxxx>
patch against 2.6.33-rc5
git --version 1.6.6

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 090f248..2cae27a 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -74,7 +74,7 @@ my %VCS_cmds;
my %VCS_cmds_git = (
"execute_cmd" => \&git_execute_cmd,
"available" => '(which("git") ne "") && (-d ".git")',
- "find_signers_cmd" => "git log --since=\$email_git_since -- \$file",
+ "find_signers_cmd" => "git log --no-color --since=\$email_git_since -- \$file",
"find_commit_signers_cmd" => "git log -1 \$commit",
"blame_range_cmd" => "git blame -l -L \$diff_start,+\$diff_length \$file",
"blame_file_cmd" => "git blame -l \$file",

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/