Years ago we had a rental all terrain forklift and of course we used the gas cans for diesel and gas ( I now insist on having seperate cans ). Well gas got put in the diesel tractor, it ran very poorly and once shut off would not restart.
Gasoline burns much hotter and faster, I could see burning up valves or burning holes through the pistons. Maybe breaking off the ring lands off the pistons from the combustion shock.
Basically the important thing is as soon as you realize you've put gasoline in is to shut off the motor, drain the system and flush out the lines if the motor has been run. Now it takes a certain amount to hurt things. If you get a couple gallons of gas in the tank, just quit pumping, fill up with diesel and dump some motor oil into the tank to help thicken the fuel up.
In the old days it was recommended practice to thin diesel fuel with gasoline during the winter. I'd guess it was discontinued because people put in too much and damaged things. But a diesel will burn about any flammable fluid as long as it doesn't burn too fast or too slow.
You could probably even run on gas and oil if you got it mixed thick enough. I know they will run on 100% oil, at least in warmer temps.