git/refs
Michael Haggerty 735267aa10 die_unterminated_line(), die_invalid_line(): new functions
Extract some helper functions for reporting errors. While we're at it,
prevent them from spewing unlimited output to the terminal. These
functions will soon have more callers.

These functions accept the problematic line as a `(ptr, len)` pair
rather than a NUL-terminated string, and `die_invalid_line()` checks
for an EOL itself, because these calling conventions will be
convenient for future callers. (Efficiency is not a concern here
because these functions are only ever called if the `packed-refs` file
is corrupt.)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-14 15:19:07 +09:00
..
files-backend.c ref_iterator: keep track of whether the iterator output is ordered 2017-09-14 15:19:07 +09:00
iterator.c prefix_ref_iterator: break when we leave the prefix 2017-09-14 15:19:07 +09:00
packed-backend.c die_unterminated_line(), die_invalid_line(): new functions 2017-09-14 15:19:07 +09:00
packed-backend.h packed-backend: rip out some now-unused code 2017-09-09 03:18:04 +09:00
ref-cache.c ref_iterator: keep track of whether the iterator output is ordered 2017-09-14 15:19:07 +09:00
ref-cache.h ref_iterator: keep track of whether the iterator output is ordered 2017-09-14 15:19:07 +09:00
refs-internal.h ref_iterator: keep track of whether the iterator output is ordered 2017-09-14 15:19:07 +09:00