Having taken a tour of Civil War named streets in my neighborhood, I'm thinking, naturally, of George B. McClellan. The Seven Days battles happened on his retreat down the Peninsula, and marked the advent of Robert E. Lee. Second Manassas (see? I'm not unreasonable about the name itself, just seeing it in my neighborhood) happened when McClellan was temporarily replaced by Pope, successful in the West, who then got creamed by Lee.
McClellan was a superb manager and a terrible leader. We most value those who rise to the top in a crisis, even though most time is spent in non-crisis. McClellan was at his worst in a crisis, and at his best with the routine.
McClellan's men loved him. And why not? He kept them fed, supplied, and, as far as he could, safe from combat. He would only put them in harm's way when he had overwhelming superiority of numbers. Vain, self-important, and paranoid, McClellan would make a poor hero of a work of fiction.
But writers often use "popular with his troops" as an index of admirability. And, I suppose, it is. Lee was popular with his troops too, and Lee is a classic fictional hero. But humans can love, en masse, people they would not admire or even like individually. Can fiction handle a popular, pompous narcissist? History certainly can.