Skip to content

Commit

Permalink
fuck it
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Jun 4, 2024
1 parent 345f005 commit e4c17f8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/mapdiffbot2/src/git_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ fn merge_base_into_head(base: &str, head: &str, repo: &Repository) -> Result<()>
if let Err(e) = repo
.merge(
&[&repo.reference_to_annotated_commit(&base_branch)?],
Some(git2::MergeOptions::default().fail_on_conflict(true)),
Some(
git2::MergeOptions::default()
.ignore_whitespace(true)
.fail_on_conflict(false)
.file_favor(git2::FileFavor::Theirs),
),
Some(
CheckoutBuilder::default()
.force()
Expand All @@ -151,6 +156,11 @@ fn merge_base_into_head(base: &str, head: &str, repo: &Repository) -> Result<()>
.wrap_err("Trying to merge base into head")
{
repo.cleanup_state()?;
repo.set_head(
repo.resolve_reference_from_short_name(base)?
.name()
.unwrap(),
)?;
repo.checkout_head(Some(
CheckoutBuilder::default()
.force()
Expand Down

0 comments on commit e4c17f8

Please sign in to comment.