Make sample pre-commit hook output Emacs friendly.

Use the common error message format, "filename:lineno: body";
this way, problematic lines can be jumped to from the Emacs
compilation buffer by C-x `.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2005-08-20 01:05:12 -07:00
parent 51890a64eb
commit b779dd5ee3

View file

@ -28,7 +28,8 @@ perl -e '
print "* In $filename\n";
$reported_filename = $filename;
}
print "* $why (line $lineno)\n$line\n";
print "* $why (line $lineno)\n";
print "$filename:$lineno:$line\n";
}
open $fh, "-|", qw(git-diff-cache -p -M --cached HEAD);
while (<$fh>) {