A pistol is only good at ranges up to 50 yards at best, usually under 25 yards. That is why the developement of the repeating weapons was such a big event. Now you have the added firepower of the revolver with some of the range of a musket. A very good compromise. Examples are the Spencers, Henrys, and Colt Repeating Rifles. If you google the Colt Rifle you will see that they took the distinct features of a revolver and put them in a rifle. Some soldiers loved them while others cursed it. Probably was determined by how much care was used in keeping the rifle clean and how much care used during the loading process.
The Spencer held 7 shots, the Henry 16, and the colt either 5 or 6 depending on caliber. The Spencers were used the most. People will argue all day long as to the Spencer or the Henry being the best. The Spencers were primarily used by the cavalry while the Henry was mainly used by infantry, almost all being private purchase by individual soldiers.
Another system was the breech loader with the Sharps being the most prevelant during the war. It was loaded at the breech, where the barrel starts, not the end like the traditional Springfields, Enfields, and Lorenz. You did not have to use ramrods and thus were easier to load and could be fired 2 to 3 times faster than above muzzle loaders. The famous Berdans Sharpshooters used the Sharps Rifle supporting some claims that the Sharps was the best weapon during the war.
More specifically to your original question, doing the actual fighting was not the primary function of the line officers that carried the revolvers. Their duties was to align the men, keep them from falling back, boost morale, ordering charges when necessary, and carrying out orders from superior officers. The revolver was mainly for their self defense if the enemy came too close and to add some additional firepower to help prevent a breakthru in the line.