Would pepper spray thwart a pit bull attack?
It depends on the dog and the circumstances; probably it would. Another thing you can do is advance towards the dog, holding your arms out to make yourself larger and shouting; most dogs are used to people running, not charging back at them. One of the highlights of my life was when I turned a rottweiler around by doing that.
He tripped over his own feet trying to turn around.