Skip to content

Panic on 3-way merge #9

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

Closed
mxfunc opened this issue Jan 27, 2021 · 3 comments
Closed

Panic on 3-way merge #9

mxfunc opened this issue Jan 27, 2021 · 3 comments

Comments

@mxfunc
Copy link

mxfunc commented Jan 27, 2021

Test Case:

fn main() {

let base = r#"
class GithubCall(db.Model):

`url`: URL of request Example.`https://api.github.com`"#;

    let theirs = r#"
class GithubCall(db.Model):

`repo`: String field. Github repository fields. Example: `amitu/python`"#;

    let ours = r#"
class Call(models.Model):
`body`: String field. The payload of the webhook call from the github.

`repo`: String field. Github repository fields. Example: `amitu/python`"#;

    println!("Diffy merge test");
    match diffy::merge(base, ours, theirs) {
        Ok(s) => {
            println!("{}", s);
        }
        Err(s) => {
            println!("{}", s);
        }
    }
}

Findings:

  • The panic disappears if the clean_conficts function is commented.
  • The panic disappears if the ConflictStyle is changed from ConflictStyle::Diff3 to ConflictStyle::Merge
@bmwill
Copy link
Owner

bmwill commented Jan 27, 2021

@mxfunc Thank you so much for the bug report! I think I've already identified the issue and will have a fix out shortly.

@bmwill bmwill closed this as completed in 59cf37a Jan 27, 2021
@mxfunc
Copy link
Author

mxfunc commented Jan 27, 2021

Thanks @bmwill for the super fast fix!

@bmwill
Copy link
Owner

bmwill commented Jan 27, 2021

Of course! Please let me know if you find any other issues :)

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

No branches or pull requests

2 participants