From: Jeff King Date: Fri, 5 Apr 2019 18:13:56 +0000 (-0400) Subject: server-info: use strbuf to read old info/packs file X-Git-Tag: v2.22.0-rc0~70^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4ecbd6492cde3fcf003c387414b3e9983fb2ba4b?ds=inline;hp=4ecbd6492cde3fcf003c387414b3e9983fb2ba4b 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 Signed-off-by: Junio C Hamano ---