Skip to content

Commit

Permalink
update dolt_merge check
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks committed Jan 27, 2024
1 parent 56c09cd commit adcfbbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nautobot_version_control/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ def merge(self, merge_branch, user=None, squash=False):
);"""
)
res = cursor.fetchone()
if res[0] == 0 and res[1] == 0: # magic???
# dolt_merge returns a signature that is at the time of this writing:
# ws, h.String(), noConflictsOrViolations, fastForwardMerge, str, nil
# test the noConflictsOrViolations and fastForwardMerge is good
if res[1] == 0 and res[2] == 0: # magic???
# only commit merged data on success
msg = f"""merged "{merge_branch}" into "{self.name}"."""
cursor.execute( # TODO: not safe
Expand Down

0 comments on commit adcfbbc

Please sign in to comment.