This is almost out of Monty Python and the Holy Grail.
The burial of the dead on the battlefield had to be done so hurriedly many times that more than one poor fellow who perhaps had been stunned and left on the field had a "close call" to being buried alive. A case in mind was that of one at Cold Harbor who had been picked up as dead, and as the men dropped their burden by the open trench the shock resuscitated the man and he faintly asked: "What's going on, boys?"
The response was, "We were going to bury you, Shorty."
"Not if I know myself," he replied. "Get me a cup of coffee and I'll be all right; I won't be buried by that county clodhopper."
The "clodhopper" referred to was the sergeant in charge of the squad, who belonged to a company of our regiment that came from the central part of the state, while a man who had been so near the "dark valley" was a member of the New York City company."
This was taken from Drum Taps in Dixie: Memoirs of a Drummer Boy, 1861-1865, Delavan S. Mille
r. The unit is the 2nd New York Heavy Artillery.