Yes, he did exactly the right thing at the right time, leading the 20th Maine in (what I thought it was remembered as) the swinging gate maneuver.
A nice tactical maneuver in a little battle that didn’t make much difference in the outcome of the battle.