gc: improve handling of errors reading gc.log
commit3c426eccc29e38301774e90adeea336642826b0c
authorJonathan Nieder <jrnieder@gmail.com>
Tue, 17 Jul 2018 06:53:21 +0000 (16 23:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Jul 2018 18:18:07 +0000 (17 11:18 -0700)
treef725d148f84c020b3c51254c9a3f77d93e300838
parent53f9a3e157dbbc901a02ac2c73346d375e24978c
gc: improve handling of errors reading gc.log

A collection of minor error handling fixes:

- use an error message in lower case, following the usual style
- quote filenames in error messages to make them easier to read and to
  decrease translation load by matching other 'stat' error messages
- check for and report errors from 'read', too
- avoid being confused by a gc.log larger than INT_MAX bytes

Noticed by code inspection.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c