Repeat a bash command until it succeeds

Github was having some downtime today, so instead of hammering on my keyboard in frustration every time my git pull failed, I decided to just run a loop based on the return code of git pull:

until git pull; do sleep 1; done;

Or, more abstractly:

until COMMAND; do
    sleep TIMEOUT_IN_SECONDS
done