Ignore merge point candidates that create crosses

In OBS you can create submit requests for revisions that are behind
the last merge point, in git you can't - so we ignore them.

Fixes #14
This commit is contained in:
Stephan Kulow
2022-11-03 15:03:41 +01:00
parent ef7755c771
commit f2019db8ff
6 changed files with 20 additions and 11 deletions

View File

@@ -107,10 +107,12 @@ class GitExporter:
if flat.parent1:
if not self.branch_fits_parent1(flat, branch_state):
logging.info(f"Reset {flat.branch} onto {flat.parent1.short_string()}")
assert flat.parent1.git_commit
self.git.set_branch_head(flat.branch, flat.parent1.git_commit)
self.git.checkout(flat.branch)
parents.append(flat.parent1.git_commit)
if flat.parent2:
assert flat.parent2.git_commit
parents.append(flat.parent2.git_commit)
# Overwrite ".gitattributes" with the