Skip to content

Commit 31d3ab3

Browse files
Add a failing test case.
1 parent c14ee52 commit 31d3ab3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/revert_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,13 @@ def test_revert_orphan
6161
index = @repo.revert_commit(revert, head)
6262
verify_index(index, expected)
6363
end
64+
65+
# GH-566
66+
def test_reverted_index_does_not_cause_segfault_on_diff
67+
head = Rugged::Commit.lookup(@repo,"39467716290f6df775a91cdb9a4eb39295018145")
68+
revert = Rugged::Commit.lookup(@repo, "ebb03002cee5d66c7732dd06241119fe72ab96a5")
69+
70+
index = @repo.revert_commit(revert, head)
71+
index.diff
72+
end
6473
end

0 commit comments

Comments
 (0)