fix: The solve command preserves revision names in conflicts #74
No reviewers
Labels
No labels
Compat/Breaking
Kind
Bad merge
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
New language
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mergiraf/mergiraf#74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "wetneb/mergiraf:solve_keeps_revision_names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For #37. It does not solve the issue entirely, there is more to do before closing it.
acdbede88e
to21bc76e977
21bc76e977
to6ae73906ab
@ -347,1 +381,4 @@
}
/// Update display settings by taking revision names from merge (if there are any conflicts)
pub fn add_revision_names<'a>(&'a self, settings: &DisplaySettings<'a>) -> DisplaySettings<'a> {
Since
settings
get either cloned or dereferenced, I think we might as well take them by value here.This looks great! I actually started something very similar to this, but didn't end up submitting a PR. I think this should be good to go after the one change I've proposed
Sure! It does add a few
.clone()
calls then, unless you'd make more changes to the callers of this method to avoid that?Oh, you're right. Though I think those are actually fine in this case, since the only thing that needs to be cloned are the
Cow
s, which are of theBorrowed
variant in the tests, andclone
is free for those (see implementation).I'm away from the computer and can't check right now, but would it be possible to changeresolve_merge
to takesettings
by value, as you said?I guess this just repeats your question back. I'll take a look at it when I can.
From what I can tell it would just displace the
clone()
toresolve_merge_cascading
.I think I figured it out! Unfortunately I can't open a PR on your fork, so please see my branch: the current HEAD. It removes the second commit from this PR, but the first one is left unchanged.
46989ce879
to49e3fae8a7
I think it makes sense to move the method to DisplaySettings indeed, and make it mutate an instance feels sensible too. Thank you! Weird that you can't open a PR on my fork, it looks like it's enabled - what problem did you encounter exactly? I was able to make rvalyi/mergiraf#1 earlier…
You're welcome:)
Coincidentally, I also wanted to open a PR there (to submit a resolution of the merge conflict), but couldn't -- the "New pull request" button was greyed out. And it's the same with wetneb/mergiraf. I guess you can open PRs under PRs coming from a fork of a project you own precisely because you are the owner.
I would squash-commit this, since the latter commits are just various fixes in the first one. But I'll leave it to you in case you don't want to squash. Generally, I think the history/contents of the patch set is already captured well enough in the PR, so it's okay to have the final commit itself be a squashed one
Oh, I've just noticed that my second commit (with lint fixes) has nothing to do with this PR, and should instead be a part of #81. So please do merge that one first.
Weird, I don't see why privileges on this repo should have anything to do with the ability to open a PR on a fork of it… And even weirder if it requires ownership, because you already have write access. But it seems that you are right, I can reproduce this behaviour on other Codeberg projects. I have opened an issue for it: forgejo/forgejo#6185
Would you like to become an owner ("publisher" in terms of the governance model)? Beyond serving as a work-around to this problem, I would be comfortable with that, given the amazing participation you have made so far :)
It hadn't even occurred to me that this can be a bug! Thank you for taking your time to do this:)
That's very kind of you! I would be glad to:)
Option
s for default fields #161