diff options
author | Jeff King <peff@peff.net> | 2019-04-05 14:13:56 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-16 16:58:21 +0900 |
commit | 4ecbd6492cde3fcf003c387414b3e9983fb2ba4b (patch) | |
tree | 818fd510da857e266133579f4e3c9c25a6d9040d /notes-utils.c | |
parent | server-info: simplify cleanup in parse_pack_def() (diff) | |
download | tgif-4ecbd6492cde3fcf003c387414b3e9983fb2ba4b.tar.xz |
server-info: use strbuf to read old info/packs file
This old code uses fgets with a fixed-size buffer. Let's use a strbuf
instead, so we don't have to wonder if "1000" is big enough, or what
happens if we see a long line.
This also lets us drop our custom code to trim the newline.
Probably nobody actually cares about the 1000-char limit (after all, the
lines generally only say "P pack-[0-9a-f]{40}.pack"), so this is mostly
just about cleanup/readability.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-utils.c')
0 files changed, 0 insertions, 0 deletions