-
Notifications
You must be signed in to change notification settings - Fork 346
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
(debug) assertion failure at MergedTree::merge()
by rebasing resolvable commit
#2654
Comments
Thanks for reporting. I don't know what's going on there yet. It bothers me, but the bug is quite harmless, so I'll probably prioritize more impactful changes in the near future. |
I think the problem is that the conflicted tree may be padded with absent trees, whereas file-level conflict resolution requires that all tree values are files. Inserting |
Oh, that makes sense! |
Hmm, it might be because an empty subtree is added to the parent while propagating conflicts up, creating non-empty parent tree containing empty trees. I'll take a look. [UPDATED] or maybe there are two separate problems. Adding empty subtree to parent is probably wrong, but |
Otherwise an empty subtree would be added to the parent tree. If the stored tree contained an empty subtree, simplify() wouldn't work against new "absent" subtree representation. I don't know if there's a such code path, but I believe it's very rare to encounter the problem. jj-vcs#2654
…flict I think this is a variant of the problem fixed by 7fda80f "tree: simplify conflict before resolving at hunk level." We need to simplify() the conflict before and after extracting file ids because the source conflict values may contain trees to be cancelled out, and the file values may differ only in exec bits. Since the legacy tree passes a simplified conflict in to this function, I made the merged tree do the same. Fixes jj-vcs#2654
Otherwise an empty subtree would be added to the parent tree. If the stored tree contained an empty subtree, simplify() wouldn't work against new "absent" subtree representation. I don't know if there's a such code path, but I believe it's very rare to encounter the problem. #2654
## [0.12.0] - 2023-12-05 ### Breaking changes * The `remote_branches()` revset no longer includes branches exported to the Git repository (so called Git-tracking branches.) * `jj branch set` no longer creates a new branch. Use `jj branch create` instead. * `jj init --git` in an existing Git repository now errors and exits rather than creating a second Git store. ### New features * `jj workspace add` can now take _multiple_ `--revision` arguments, which will create a new workspace with its working-copy commit on top of all the parents, as if you had run `jj new r1 r2 r3 ...`. * You can now set `git.abandon-unreachable-commits = false` to disable the usual behavior where commits that became unreachable in the Git repo are abandoned ([#2504](jj-vcs/jj#2504)). * `jj new` gained a `--no-edit` option to prevent editing the newly created commit. For example, `jj new a b --no-edit -m Merge` creates a merge commit without affecting the working copy. * `jj rebase` now takes the flag `--skip-empty`, which doesn't copy over commits that would become empty after a rebase. * There is a new `jj util gc` command for cleaning up the repository storage. For now, it simply runs `git gc` on the backing Git repo (when using the Git backend). ### Fixed bugs * Fixed another file conflict resolution issue where `jj status` would disagree with the actual file content. [#2654](jj-vcs/jj#2654)
Description
Maybe this is another case of 7fda80f? Without debug assertion, we'll get a conflicted file with no conflict markers.
Steps to Reproduce the Problem
Expected Behavior
The last
jj rebase
succeeds.Actual Behavior
Specifications
The text was updated successfully, but these errors were encountered: