Let the passenger train through!

A goods train, made up of a locomotive and 5 trucks, stops at a small station. The small station has a siding which the goods train can reverse into. The siding can hold an engine and two trucks or three trucks.

A passenger train arrives travelling in the opposite direction. How can they let it through? (The passenger train is too long to fit in the siding.)