libgit2/libgit2 — pull request #2188 by carlosmn (2014-03-15 03:04:47+00:00)
Title: [RFC] Configuration snapshotting

Thinking about immutable data structures is a lot easier than dealing with locks that only affect certain parts of the system, so let's start tackling the config autorefresh situation this way. Introduce `git_repository_snapshot()` to create a read-only version of the configuration for things like remote and submodule loading which don't want to read half of a version of the file.

If we like this direction, I'll see what other things need converting. This version of the code creates a copy of everything, which is not terribly efficient. A later version will do refcounting or whatever.