There's no way to abort.  If we fail to write to the lock file (e.g. because the disk is full) closing the lock file so we can delete it and abort to the caller will replace the main file, potentially destroying the user's repository.