libgit2/libgit2sharp — pull request #499 by dahlbyk (2013-08-25 04:04:14+00:00)
Title: Respect core.logAllRefUpdates

Stumbled on this setting tonight...

> Enable the reflog. Updates to a ref is logged to the file "$GIT_DIR/logs/", by appending the new and old SHA-1, the date/time and the reason of the update, but only when the file exists. If this configuration variable is set to true, missing "$GIT_DIR/logs/" file is automatically created for branch heads (i.e. under refs/heads/), remote refs (i.e. under refs/remotes/), note refs (i.e. under refs/notes/), and the symbolic ref HEAD.
>
> This information can be used to determine what commit was the tip of a branch "2 days ago".
>
> This value is true by default in a repository that has a working directory associated with it, and false by default in a bare repository.

This isn't ready to merge yet, but I wanted to get it out for comment...

Using `ObjectDatabase` to create a commit to target with a branch was the first thing I thought of to create a reflog entry in a bare repo...did I overlook something obviously simpler?

* [ ] Fix that `CreateBranch()` does not write to reflog (or I can open a separate issue... easy enough to fix here and I'd like my test to use it instead of the more obtuse `Refs.Add(...)`).
* [ ] Complete implementation of `repo.Config.GetValue(key, defaultValue)`? Seems a common enough pattern (even in our tests) to make simple, but didn't want to waste time on overloads/docs if you disagree.