libgit2/libgit2 — pull request #2126 by jspahrsummers (2014-02-19 00:06:58+00:00)
Title: [WIP] Reload config in git_submodule_lookup() if not found

If the submodule config is already in memory, and we can’t find the desired name in there, check back on disk for it. This is especially important when diffing, since it’s possible that further changes could have occurred since the configuration was reloaded.

Of course, this change is based on my limited knowledge of how libgit2 handles cache invalidation. If this should be handled at the application level by reloading all submodules before diffing, that'd be acceptable as well (though not ideal), and I can close this.

**To do:**

- [ ] Add a test that exposes the original issue

/cc @joshaber @arrbee