Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions PyGitUp/gitup.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,12 @@ def rebase_all_branches(self):

continue # Do not do anything

fast_fastforward = False
if base == branch.commit.hexsha:
print(colored('fast-forwarding...', 'yellow'), end='')
self.states.append('fast-forwarding')
# Don't fast fast-forward the currently checked-out branch
fast_fastforward = (branch.name != self.repo.active_branch.name)

elif not self.settings['rebase.auto']:
print(colored('diverged', 'red'))
Expand All @@ -286,8 +289,11 @@ def rebase_all_branches(self):
print()

self.log(branch, target)
self.git.checkout(branch.name)
self.git.rebase(target)
if fast_fastforward:
branch.commit = target.commit
else:
self.git.checkout(branch.name)
self.git.rebase(target)

def fetch(self):
"""
Expand Down