gits: fix ask_reset_hard_or_push_f(), missing args

Change-Id: I91a1087ce1f6399ff652dfeba0097f275050aba3
This commit is contained in:
Neels Hofmeyr 2018-11-23 04:09:10 +01:00
parent 20d95d003e
commit ae79f4b349
1 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ def ask(git_dir, *question, valid_answers=('*',)):
return answer return answer
def ask_reset_hard_or_push_f(git_dir): def ask_reset_hard_or_push_f(git_dir, orig_branch, upstream_branch):
do_reset = ask(git_dir, 'Diverged.', do_reset = ask(git_dir, 'Diverged.',
'%s: git reset --hard %s?' % ( '%s: git reset --hard %s?' % (
orig_branch, upstream_branch), orig_branch, upstream_branch),
@ -290,7 +290,7 @@ def rebase(git_dir):
# Diverged # Diverged
elif ahead and behind: elif ahead and behind:
ask_reset_hard_or_push_f(git_dir) ask_reset_hard_or_push_f(git_dir, orig_branch, upstream_branch)
# Behind # Behind
elif behind: elif behind:
@ -318,7 +318,7 @@ def rebase(git_dir):
git(git_dir, 'commit', '-am', 'wip', may_fail=True) git(git_dir, 'commit', '-am', 'wip', may_fail=True)
git(git_dir, 'checkout', orig_branch) git(git_dir, 'checkout', orig_branch)
ask_reset_hard_or_push_f(git_dir) ask_reset_hard_or_push_f(git_dir, orig_branch, upstream_branch)
return orig_branch return orig_branch