Skip to content

Commit

Permalink
Abort no-commit merge only if not up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Feb 19, 2024
1 parent aa87c15 commit 7f65015
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions galaxy_release_util/point_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,10 @@ def is_merge_required(base_branch: str, new_branch: str, galaxy_root: pathlib.Pa
process = subprocess.run(
["git", "merge", "--no-commit", "--no-ff", base_branch],
cwd=galaxy_root,
capture_output=False,
capture_output=True,
)
subprocess.run(["git", "merge", "--abort"], cwd=galaxy_root)
if not process.stdout == b"Already up to date.\n":
subprocess.run(["git", "merge", "--abort"], cwd=galaxy_root)
if process.returncode == 0:
return False
return True
Expand Down

0 comments on commit 7f65015

Please sign in to comment.