write_sha1_file: freshen existing objects