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:
parent
51890a64eb
commit
b779dd5ee3
@ -28,7 +28,8 @@ perl -e '
|
|||||||
print "* In $filename\n";
|
print "* In $filename\n";
|
||||||
$reported_filename = $filename;
|
$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);
|
open $fh, "-|", qw(git-diff-cache -p -M --cached HEAD);
|
||||||
while (<$fh>) {
|
while (<$fh>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user