libgit2/libgit2 — pull request #2042 by carlosmn (2014-01-13 19:40:11+00:00)
Title: [WIP] refs: conditional ref updates

Allow updating references if the old value matches the given one.

I'm not 100% on whether `git_reference_create_if()` is a good API or not, or if we want to keep it restricted to `git_reference_set_target_if()`.

If we already have a reference (as in the case is `set_target()`), should we allow way to say "update if the old value matches the one from this object"?