The response of an intrinsic Ge detector in energy-dispersive diffraction measurements with synchrotron radiation is studied with model calculations and diffraction from perfect Si single-crystal samples. The high intensity and time-structure of the synchrotron radiation beam leads to pile-up of the output pulses, and the energy distribution of the pile-up pulses is characteristic of the fill pattern of the storage ring. The pile-up distribution has a single peak and long tail when the interval of the radiation bunches is small, as in the uniform fill pattern, but there are many pile-up peaks when the bunch distance is a sizable fraction of the length of the shaping amplifier output pulse. A model for the detecting chain response is used to resolve the diffraction spectrum from a perfect Si crystal wafer in the symmetrical Laue case. In the 16-bunch fill pattern of the ESRF storage ring the spectrum includes a large number of ;extra reflections' owing to pile-up, and the model parameters are refined by a fit to the observed energy spectrum. The model is used to correct for the effects of pile-up in a measurement with the 1/3 fill pattern of the storage ring. Si reflections (2h,2h,0) are resolved up to h = 7. The pile-up corrections are very large, but a perfect agreement with the integrated intensities calculated from dynamical diffraction theory is achieved after the corrections. The result also demonstrates the convergence of kinematical and dynamical theories at the limit where the extinction length is much larger than the effective thickness of the perfect crystal. The model is applied to powder diffraction using different fill patterns in simulations of the diffraction pattern, and it is demonstrated that the regularly spaced pile-up peaks might be misinterpreted to arise from superlattices or phase transitions. The use of energy-dispersive diffraction in strain mapping in polycrystalline materials is discussed, and it is shown that low count rates but still good statistical accuracy are needed for reliable results.