msubprojects: Abort the rebase if there's conflicts

Don't leave the subproject tree in a broken / conflicting state. The
user is most likely not a git expert who will know what magic command
to run to fix their source tree.
This commit is contained in:
Nirbheek Chauhan 2023-10-07 03:09:44 +05:30 committed by Nirbheek Chauhan
parent 3af0632c3d
commit b78aa8f9e9
1 changed files with 3 additions and 1 deletions

View File

@ -231,7 +231,9 @@ class Runner:
try:
self.git_output(['-c', 'rebase.autoStash=true', 'rebase', 'FETCH_HEAD'])
except GitException as e:
self.log(' -> Could not rebase', mlog.bold(self.repo_dir), 'onto', mlog.bold(revision))
self.git_output(['-c', 'rebase.autoStash=true', 'rebase', '--abort'])
self.log(' -> Could not rebase', mlog.bold(self.repo_dir), 'onto', mlog.bold(revision),
'-- aborted')
self.log(mlog.red(e.output))
self.log(mlog.red(str(e)))
return False