How did Angel Eyes become a sergeant in the Union army?
During the first quarter of the movie Angel Eyes is obviously a civilian, with no allegiance to either the Union or the Confederacy. However, when Tuco and Blondie arrive at the Union prison camp (called Batterville in the bonus footage), Angel Eyes is there, a sergeant in full military dress. In fact, he seems loyal to the Union cause. He even complains to his superior how the troops are being mistreated at Andersonville. Then when Angel Eyes and Blondie leave the camp for the hidden gold, no further mention of his military commission is made again.
So how did Angel Eyes got promoted from civilian to sergeant so fast? And how did he leave the prison camp without anyone from the Union army knowing?