summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-09-13 19:15:58 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-14 15:19:07 +0900
commit735267aa100e5e75e5b8c74d47f412ad50851ec9 (patch)
treef15def4c00d7ed783c2307beb3088034e58806a5 /commit.c
parentf0a7dc86d2919a2b91e46503f1df173e58977ef2 (diff)
downloadgit-735267aa100e5e75e5b8c74d47f412ad50851ec9.tar.gz
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>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions