bmwill / diffy

Tools for finding and manipulating differences between files
Apache License 2.0
75 stars 22 forks source link

Panic on 3-way merge #9

Closed mxfunc closed 3 years ago

mxfunc commented 3 years ago

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:

bmwill commented 3 years ago

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

mxfunc commented 3 years ago

Thanks @bmwill for the super fast fix!

bmwill commented 3 years ago

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