]> Kevux Git Server - rit/commit
apply: report input location in header parsing errors
authorJialong Wang <jerrywang183@yahoo.com>
Tue, 17 Mar 2026 16:23:20 +0000 (12:23 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Mar 2026 18:08:24 +0000 (11:08 -0700)
commit838c0ba5004b37009d8d2649ed1be7b77770c2f0
tree58bff4c7c03a4c5a3af441e85a28f7c908fa3f6c
parentc5e15c9a58c0b32ec8be3ae96434834124de175e
apply: report input location in header parsing errors

Several header parsing errors in apply.c still report only line
numbers. When applying more than one input, that does not tell the
user which input the line belongs to.

Report the patch input location for these header parsing errors, and
update the related tests.

While touching parse_git_diff_header(), update the helper state to use
the current header line when reporting these errors.

Signed-off-by: Jialong Wang <jerrywang183@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
apply.h
range-diff.c
t/t4100-apply-stat.sh
t/t4254-am-corrupt.sh