gits: dont ask to push -f to None

Change-Id: I5edf0abff1b01a3d85e4bf2d77c8ab964e0bf2f0
This commit is contained in:
Neels Hofmeyr 2019-03-29 15:42:41 +01:00
parent efa34acc59
commit 7f46be3a0d
1 changed files with 7 additions and 6 deletions

View File

@ -337,12 +337,13 @@ def rebase(git_dir):
git(git_dir, 'rebase', '-i', 'origin/master') git(git_dir, 'rebase', '-i', 'origin/master')
# On conflicts, we'll exit with error implicitly # On conflicts, we'll exit with error implicitly
do_push = ask(git_dir, 'git push -f to overwrite %r?' % upstream_branch, if upstream_branch is not None:
"<empty> don't overwrite upstream", do_push = ask(git_dir, 'git push -f to overwrite %r?' % upstream_branch,
'P `push -f` to overwrite upstream (P in caps!)', "<empty> don't overwrite upstream",
valid_answers=('', 'P')) 'P `push -f` to overwrite upstream (P in caps!)',
if do_push == 'P': valid_answers=('', 'P'))
git(git_dir, 'push', '-f') if do_push == 'P':
git(git_dir, 'push', '-f')
return orig_branch return orig_branch