Skip to content

Issue #8937 : Merging a tag with conflicts no longer shows an error dialog or fails on an annotated tag - #9010

Merged
hansva merged 1 commit into
apache:mainfrom
SAY-5:merge-tag-conflicts-8937
Oct 19, 2026
Merged

hansva merged 1 commit into
apache:mainfrom
SAY-5:merge-tag-conflicts-8937

Conversation

@SAY-5

@SAY-5 SAY-5 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

When a merge ran into conflicts, the .theirs copies were looked up with the merged name as a branch, so merging a tag first showed an error dialog from the failed ref lookup, and an annotated tag then failed with a ClassCastException because resolve() cast the tag object to a commit. The conflicting files are now read from the object that was merged and resolve() peels annotated tags through parseCommit, so the conflict message and the .ours/.theirs copies appear for tags as they do for branches. Addresses #8937.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

…rror dialog or fails on an annotated tag

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@bamaer

bamaer commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Thanks @SAY-5, LGTM.

Built and ran the hop-misc-git tests on the PR, all green. The new test fails on main with the ClassCastException from #8937. I also checked a lightweight tag, a local branch and a remote-tracking branch with conflicts: all three now get .ours/.theirs and no error dialog.

@hansva
hansva merged commit 5b62a0c into apache:main Oct 19, 2026
3 checks passed
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