Add helper to get branch and HEAD commit from push hook.