restore legacy behavior for read_sha1_file()