Fix generating patches of independent packages in a single repo

This commit is contained in:
Michal Sojka 2024-12-28 16:36:07 +01:00
parent c06d6087d3
commit 9406815aba
2 changed files with 17 additions and 1 deletions

View file

@ -450,7 +450,7 @@ def ros2nix(args):
if args.patches:
patches = subprocess.check_output(
f"if ! git diff --quiet {upstream_rev}..HEAD -- .; then git format-patch --relative {upstream_rev}..HEAD; fi",
f"for i in $(git rev-list --reverse --relative {upstream_rev}..HEAD -- .); do git format-patch --zero-commit --relative -1 $i; done",
shell=True, cwd=srcdir,
).decode().strip().splitlines()
elif head != upstream_rev: