At work (large jet aircraft) fuel tanks are drained and ventilated for almost a week before mechanics can enter to inspect and/or repair them. Diesel fuel is not volatile enough at room temperatures to be explosive. It is actually fairly difficult to get fuel tanks to explode. A fire is fairly easy though.
Regardless, in the unlikely event of a fuel tank explosion, only a the fuel vapor will contribute energy to the immediate blast. That being said, the enclosed vessel will serve to contain the explosion, at least for a few milliseconds, which amplifies it. At which point the container become shrapnel and any remaining liquid fuel creates a firebomb.... :Wow1:
If welding in a well ventilated space above the fuel line, the tank can be inerted by flushing/filling with nitrogen, argon, or carbon dioxide. The exterior must be free of fuel vapors, as an exterior flash or explosion is still possible.