The General

Western &amp; Atlantic Railroad train engineer Johnnie Gray (Keaton) is in Marietta, Georgia to see one of the two loves of his life, his fiancee Annabelle Lee (Marion Mack)âthe other being his locomotive, The Generalâwhen the American Civil War breaks out. He hurries to be first in line to sign up with the Confederate Army, but is rejected because he is too valuable in his present job; unfortunately, Johnnie is not told this reason and is forcibly ejected from the office when he tries to enlist surreptitiously. On leaving, he runs into Annabelle's father and brother, who beckon to him to join them in line, but he sadly walks away, giving them the impression that he does not want to enlist. Annabelle coldly informs Johnnie that she will not speak to him again until he is in uniform.
A year passes, and Annabelle receives word that her father has been wounded. She travels north on the General to see him but still wants nothing to do with Johnnie. When the train makes a stop, the passengers detrain for a quick meal. As planned, Union spies led by Captain Anderson (Glen Cavender) use the opportunity to steal the train. Annabelle becomes an inadvertent prisoner. Johnnie gives chase, first on foot, then by handcar and boneshaker bicycle, before reaching a station in Chattanooga. He alerts the army detachment there, which boards another train to give chase, with Johnnie manning the locomotive, the Texas. However, the flatcars are not hooked up to the engine, and the troops are left behind. By the time Johnnie realizes he is alone, it is too late to turn back.
The Union agents try a variety of methods to shake their dogged pursuer (convinced he is accompanied by Confederate soldiers), including disconnecting their trailing car and dropping railroad ties on the tracks. As the unusual duel continues northward, the Confederate Army of Tennessee is ordered to retreat and the Northern army advances in its wake. Johnnie finally notices he is surrounded by Union soldiers and the hijackers see that Johnnie is by himself. Johnnie stops his locomotive and runs into the forest to hide.
At nightfall, Johnnie stumbles upon the Northern army encampment. Hungry, he climbs through a window to steal some food but has to hide underneath the table when enemy officers enter. He overhears them discussing their plan to launch a surprise attack; Johnnie learns that securing the Rock River Bridge is essential for their supply trains. He then sees Annabelle brought in; she is taken to a room under guard while they decide what to do with her. After the meeting ends, Johnnie manages to knock out both of the guards and free Annabelle. They escape into the woods.
The next day, Johnnie and Annabelle creep out of the woods and find themselves near a railway station, where Union soldiers, guns, trains, and equipment are being organized for the attack. Seeing the General in the midst of it all, Johnnie devises a plan to warn the South. After sneaking Annabelle, hidden inside a sack, onto a boxcar behind the General, Johnnie steals his engine back. Two other trains, including the Texas, set out after the pair, while the Northern attack is immediately set in motion. In a reversal of the first chase, Johnnie has to fend off his pursuers. Finally, he starts a fire behind the General in the center of the Rock River Bridge.
Reaching friendly lines, Johnnie informs the local army commander of the impending attack. Confederate forces rush to defend the bridge. Meanwhile, Annabelle is reunited with her convalescing father. The Texas is driven onto the burning bridge, but it collapses, (in what would later come to be recognized as the most expensive stunt of the silent era).[4] Union soldiers try to ford the river, but Confederate artillery and infantrymen open fire on them, eventually driving them back in disarray.
After returning from the battle, Johnnie feels himself separated from the celebrations ensuing, as he is still not a soldier. He returns to his locomotive to find the Union officer he had knocked out earlier in order to escape regaining consciousness on the floor of the cab. He takes the officer as a prisoner in a chivalrous manner, and is spotted by the general leaving the locomotive with a Union officer in his custody. The general formally takes the officer prisoner by accepting his sword. As a reward for his bravery, Johnnie is commissioned as a lieutenant in the army and given the captured officer's sword. In the final scene, Johnnie tries to kiss his girlfriend but is obliged to return the salutes of passing soldiers. Johnnie finally uses one hand to embrace his girlfriend while using his other to blindly salute the men as they walk by.

Question: What does Johnie do to the officer?
Answer: He takes the officer as a prisoner in a chivalrous manner.