diff options
| author | Jialong Wang <jerrywang183@yahoo.com> | 2026-03-17 12:23:20 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-17 11:08:24 -0700 |
| commit | 838c0ba5004b37009d8d2649ed1be7b77770c2f0 (patch) | |
| tree | 58bff4c7c03a4c5a3af441e85a28f7c908fa3f6c /range-diff.c | |
| parent | c5e15c9a58c0b32ec8be3ae96434834124de175e (diff) | |
| download | git-838c0ba5004b37009d8d2649ed1be7b77770c2f0.tar.xz | |
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>
Diffstat (limited to 'range-diff.c')
| -rw-r--r-- | range-diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/range-diff.c b/range-diff.c index 57edff40a8..2712a9a107 100644 --- a/range-diff.c +++ b/range-diff.c @@ -140,7 +140,7 @@ static int read_patches(const char *range, struct string_list *list, if (eol) *eol = '\n'; orig_len = len; - len = parse_git_diff_header(&root, &linenr, 0, line, + len = parse_git_diff_header(&root, NULL, &linenr, 0, line, len, size, &patch); if (len < 0) { error(_("could not parse git header '%.*s'"), |
