Conversation
|
/cc @nulltoken, @ethomson, @CrumblyCake |
|
As @CrumblyCake did most of the work here, I suggest we squash this into a single commit (with credit going to @CrumblyCake ), as long as he agrees (both with where this pull request has landed and to have his name attached with the final result). |
|
This is looking awesome to me. Giant thanks to @jamill and @CrumblyCake ! |
LibGit2Sharp.Tests/MergeFixture.cs
Outdated
There was a problem hiding this comment.
Maybe make those variables and the other ones in the tests below as const?
|
@CrumblyCake @jamill I ❤️ this Tiny proposal: how about adding small ASCII graphs in the tests to show the state of the branches before the merge? |
There was a problem hiding this comment.
It doesn't seem this variable is used in the assertions.
LibGit2Sharp/MergeResult.cs
Outdated
|
@jamill Definitely happy with both and very much hope I can be of more use in the libraries future! |
|
@jamill 👍 |
LibGit2Sharp.Tests/MergeFixture.cs
Outdated
Bring initial merge functionality to LibGit2Sharp.
|
@nulltoken squashed, added the |
|
@jamill @CrumblyCake Merged. Amazing job! Thanks thousands to both of you ✨ |
There was a problem hiding this comment.
@jamill @nulltoken
Hi guys,
I'm implementing a bit of the merge stuff now and on fast forwards the head is being detached onto the merged commit. The reason these tests pass is because I must've screwed up on these lines. They should be checking the SecondBranch as it's the one that has been merged up to FirstBranch.
Assert.Equal(repo.Branches["SecondBranch"].Tip, mergeResult.Commit);
Assert.Equal(repo.Branches["SecondBranch"].Tip, repo.Head.Tip);
The change I made to pass the tests with is below:
https://github.com/libgit2/libgit2sharp/pull/608/files#r9262152


This is a PR based off of #579 - but rebased on latest and including an extra commit to tweak the merge logic. This PR would supersede #579.