libgit2/libgit2sharp — pull request #451 by dahlbyk (2013-06-12 22:50:29+00:00)
Title: Reload index on RetrieveStatus()

This fixes the repro provided in #322; however, I don't feel great about how I solved the problem.

Furthermore, this diff fails at `Assert.True(readStatus.IsDirty)`:

```diff
@@ -263,6 +263,15 @@ public void CanCopeWithExternalChangesToTheIndex()
Assert.Equal(0, repoRead.Index.Count);

repoWrite.Index.Stage("*");
+
+ writeStatus = repoWrite.Index.RetrieveStatus();
+ Assert.True(writeStatus.IsDirty);
+ Assert.Equal(2, repoWrite.Index.Count);
+
+ readStatus = repoRead.Index.RetrieveStatus();
+ Assert.True(readStatus.IsDirty);
+ Assert.Equal(2, repoRead.Index.Count);
+
repoWrite.Commit("message", DummySignature);

writeStatus = repoWrite.Index.RetrieveStatus();

```