libgit2/libgit2 — pull request #1499 by arrbee (2013-04-22 23:42:13+00:00)
Title: Support more diff config options and use the config cache more

- [x] move more `core.xyz` config options into the repository config cache
- [x] update code to the the config cache
- [x] improve config cache invalidation
- [x] support more configs in the diff code (e.g. `diff.context`)
- [x] test more diff config settings

This PR includes the work by @linquize from #1483

Apart from adding more values to the config cache and supporting more new config settings in the diff code, this PR contains two "fixes" that people may have an opinion about...

1. I made it so that `git_config_refresh()` and `git_config_set_...()` both will clear the repository config cache. Since more config settings are coming out of the cache, that seemed like the right thing to do, but I blast the whole cache every time, so it is pretty blunt.
2. I made it so that tree to tree diffs are done using case sensitive ordering even on a platform that has a case insensitive filesystem. When the case insensitive tree iterator was added, we started using the sort order of the index file to decide sort order for tree iterators, but for tree-to-tree comparison, I feel like there is no reason to do that. (This change is only part of this PR because I was changing how repo flags are initialized and happened to notice this issue.)