sha1-file: pass git_hash_algo to write_object_file_prepare()