Skip to content

Commit 11e5cac

Browse files
committed
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.
1 parent 33f0df4 commit 11e5cac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mesonbuild/msubprojects.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ def git_rebase(self, revision: str) -> bool:
229229
try:
230230
self.git_output(['-c', 'rebase.autoStash=true', 'rebase', 'FETCH_HEAD'])
231231
except GitException as e:
232-
self.log(' -> Could not rebase', mlog.bold(self.repo_dir), 'onto', mlog.bold(revision))
232+
self.git_output(['-c', 'rebase.autoStash=true', 'rebase', '--abort'])
233+
self.log(' -> Could not rebase', mlog.bold(self.repo_dir), 'onto', mlog.bold(revision),
234+
'-- aborted')
233235
self.log(mlog.red(e.output))
234236
self.log(mlog.red(str(e)))
235237
return False

0 commit comments

Comments
 (0)