Vlim is correct.
"Originally, Sgt. Alvin York used his M1911 sidearm while taking cover in a crater, gunned down six Germans with his M1911 pistol, firing back to front like he hunted turkeys but M1911 Pistols were difficult to covert to blanks at the time of filming so they simply had Cooper liberate Luger P08 off of a dead German soldier. Cooper having met York initially refused to shoot the scene with the Luger, but was told because of timing they needed to shoot the scene with the weapon, and was promised they'd re-shoot the scene with the M1911, but this never happened."
http://www.imfdb.org/wiki/Sergeant_York