Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin/merge-driver-ekeyword: Look for KEYWORDS changes in upstream commit #48

Merged
merged 3 commits into from
May 25, 2024

Conversation

mattst88
Copy link
Contributor

Previously we only looked for changes to the KEYWORDS= line in our local commit being rebased. If it contained no changes to KEYWORDS= then the merge-driver gave up.

However our local patch may conflict with an upstream patch that changed KEYWORDS.

In that case, we can look for changes to the KEYWORDS= line in the other patch and try to apply its change to ours.

This happened in gentoo.git commits

  • 2c5cd6c4e004 ("sys-fs/squashfs-tools-ng: Stabilize 1.3.0 amd64, #930693")
  • 7129c2e4e5f3 ("sys-fs/squashfs-tools-ng: run elibtoolize in non-live ebuild")

leading to a rebase mistake in the latter (later fixed by commit 7579afbd4aa1 ("sys-fs/squashfs-tools-ng: stabilize 1.3.0 for amd64")).

With this patch applied, the merge conflicts are automatically resolved between the two commits regardless of which is "ours" vs "theirs".

Copy link
Member

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for both the fixes and the explanation! Simple but not obvious :)

Fixes: 1a2c70d ("Run `pyupgrade --py39-plus`")
Signed-off-by: Matt Turner <[email protected]>
Previously we only looked for changes to the KEYWORDS= line in our local
commit being rebased. If it contained no changes to KEYWORDS= then the
merge-driver gave up.

However our local patch may conflict with an upstream patch that changed
KEYWORDS.

In that case, we can look for changes to the KEYWORDS= line in the other
patch and try to apply its change to ours.

This happened in gentoo.git commits

2c5cd6c4e004 ("sys-fs/squashfs-tools-ng: Stabilize 1.3.0 amd64, #930693")
7129c2e4e5f3 ("sys-fs/squashfs-tools-ng: run elibtoolize in non-live ebuild")

leading to a rebase mistake in the latter (later fixed by commit
7579afbd4aa1 ("sys-fs/squashfs-tools-ng: stabilize 1.3.0 for amd64")).

With this patch applied, the merge conflicts are automatically resolved
between the two commits regardless of which is "ours" vs "theirs".

Signed-off-by: Matt Turner <[email protected]>
@gentoo-bot gentoo-bot merged commit a667d93 into gentoo:master May 25, 2024
8 checks passed
@mattst88 mattst88 deleted the better-merge-driver branch May 25, 2024 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants