Hey Jon.
I have seen this done with several methods and different degrees of success. I know of one fellow who blew himself up and ended up in hospital (it was a diesel tank too, it can be just as dangerous as petrol under the right conditions), so please proceed with caution.
Personally I don't think any amount of flushing or rinsing makes a fuel tank safe to weld. In the oil and gas industry they normally use one of the following methods for welding vessels, pipes, spools, etc.
The best option is either displacement or continuous purging.
If the tank can be COMPLETLY filled with water (displacement method) and welded (while full) that should be ok but lots of flushing will be required to avoid water in the diesel when you put it back in service.
If the nature of the repair prevents filling with water a continuous purge could be used. The best thing for continuous purging is N2(nitrogen).
I have heard of people using a running car exhaust for this but have not seen it done 1st hand. The key is to purge out any O2 and thus removing one of the 3 elements required for fire/explosion, ignition, fuel & O2. The problem with purging is that it needs to be maintained during the welding operation and it is hard to measure how well it is working without an O2 meter.
Either method you should still rinse the tank with a non flammable solvent 1st.
Myself I would remove the tank, rinse it several times then fill it with water (making sure there is no trapped air pockets) and maintain it full while welding. It has worked twice for me.
Hope this helpsl.