GitHub PullRequestReviewCommentEvent at 2014-01-30 21:49:34
Repository: libgit2sharp
Actor: jamill
Payload: {"comment":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/comments/9324901","id":9324901,"diff_hunk":"@@ -169,14 +186,29 @@ public void CanFastForwardRepos()\n                 // Commit with ONE new file to first branch (FirstBranch moves forward as it is checked out, SecondBranch stays back one).\n                 AddFileCommitToRepo(repo, firstBranchFileName);\n \n-                secondBranch.Checkout();\n+                if (shouldMergeOccurInDetachedHeadState)\n+                {\n+                    // Detaches HEAD\n+                    repo.Checkout(secondBranch.Tip);\n+                }\n+                else\n+                    secondBranch.Checkout();\n+\n+                Assert.Equal(shouldMergeOccurInDetachedHeadState, repo.Info.IsHeadDetached);\n \n                 MergeResult mergeResult = repo.Merge(repo.Branches[\"FirstBranch\"].Tip, Constants.Signature);\n \n                 Assert.Equal(MergeStatus.FastForward, mergeResult.Status);\n-                Assert.Equal(repo.Branches[\"FirstBranch\"].Tip, mergeResult.Commit);\n-                Assert.Equal(repo.Branches[\"FirstBranch\"].Tip, repo.Head.Tip);\n+                Assert.Equal(repo.Head.Tip, mergeResult.Commit);","path":"LibGit2Sharp.Tests/MergeFixture.cs","position":87,"original_position":87,"commit_id":"b9efcbb433a4fe27a520f341de29932da9659597","original_commit_id":"b9efcbb433a4fe27a520f341de29932da9659597","user":{"login":"jamill","id":2045976,"avatar_url":"https://gravatar.com/avatar/dd2be90fccc63c838471e8cd35d22754?d=https%3A%2F%2Fidenticons.github.com%2Fb57fa8f7fb7964d5e1e3ac16caef4dcc.png&r=x","gravatar_id":"dd2be90fccc63c838471e8cd35d22754","url":"https://api.github.com/users/jamill","html_url":"https://github.com/jamill","followers_url":"https://api.github.com/users/jamill/followers","following_url":"https://api.github.com/users/jamill/following{/other_user}","gists_url":"https://api.github.com/users/jamill/gists{/gist_id}","starred_url":"https://api.github.com/users/jamill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamill/subscriptions","organizations_url":"https://api.github.com/users/jamill/orgs","repos_url":"https://api.github.com/users/jamill/repos","events_url":"https://api.github.com/users/jamill/events{/privacy}","received_events_url":"https://api.github.com/users/jamill/received_events","type":"User","site_admin":false},"body":"I think it still makes sense to verify that the current HEAD commit ID matches the expected FastForward Commit ID. We expect the current Head commit ID to now be equal to the tip commit on \"FirstBranch\".\r\n\r\nI don't think the original test conditions here were wrong, they were just not sufficient to verify that the HEAD was detached.","created_at":"2014-01-30T21:49:34Z","updated_at":"2014-01-30T21:49:34Z","html_url":"https://github.com/libgit2/libgit2sharp/pull/617#discussion_r9324901","pull_request_url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/617","_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/comments/9324901"},"html":{"href":"https://github.com/libgit2/libgit2sharp/pull/617#discussion_r9324901"},"pull_request":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/617"}}}}