Change-Id: I453c6644be4d6fc6032b162216b8c3a25854c26a
This commit is contained in:
Neels Hofmeyr 2020-09-25 05:17:13 +02:00
parent d9cdec6afb
commit 0a5ccc45d8
1 changed files with 4 additions and 4 deletions

View File

@ -296,7 +296,7 @@ def rebase(git_dir):
if not upstream_branch: if not upstream_branch:
do_set_upstream = ask(git_dir, 'there is no upstream branch for %r' % orig_branch, do_set_upstream = ask(git_dir, 'there is no upstream branch for %r' % orig_branch,
'<empty> skip', '<empty> skip',
'P create upstream branch (git push --set-upstream orgin %s)' % orig_branch, 'p create upstream branch (git push --set-upstream orgin %s)' % orig_branch,
'm checkout master', 'm checkout master',
valid_answers=('', 'p', 'm')) valid_answers=('', 'p', 'm'))
@ -359,14 +359,14 @@ def rebase(git_dir):
options.append('ru rebase onto upstream: git rebase -i %s' % upstream_branch) options.append('ru rebase onto upstream: git rebase -i %s' % upstream_branch)
valid_answers.append('ru') valid_answers.append('ru')
options.append('RU reset to upstream: git reset --hard %s' % upstream_branch)
valid_answers.append('RU')
if bu.is_diverged() or bu.is_ahead(): if bu.is_diverged() or bu.is_ahead():
all_good = False all_good = False
options.append('P push to overwrite upstream: git push -f') options.append('P push to overwrite upstream: git push -f')
valid_answers.append('P') valid_answers.append('P')
options.append('RU reset to upstream: git reset --hard %s' % upstream_branch)
valid_answers.append('RU')
if orig_branch == 'master' and (bm.is_ahead() or bm.is_diverged()): if orig_branch == 'master' and (bm.is_ahead() or bm.is_diverged()):
all_good = False all_good = False
options.append('<name> create new branch') options.append('<name> create new branch')