Standardize layout of blame sample
Add giterr_detach API to get and clear error

There are a number of cases where it is convenient to be able to
fetch and "claim" the current error string, clearing the error.
This is helpful when you need to call some code that may alter
the error and you want to restore it later on and/or report it via
some other mechanism.
Preserve file error in iterator

When the filesystem iterator encounters an error with a file, it
returns the error but because of the cleanup code, it was in some
cases erasing the error message.  This uses the giterr_detach API
to make sure that the actual error message is restored after the
cleanup code has been run.
Reorganize and doc-commentify blame sample.
Fix warnings
blame sample: usage comment
Take umask into account in filebuf_commit
move mode_t to filebuf_open instead of _commit
Merge pull request #1940 from ethomson/filebuf_umask

Take umask into account in filebuf_commit
Propagate ELOCKED error when updating the config
Merge pull request #1942 from libgit2/fix/config_propagate_error

Propagate ELOCKED error when updating the config
error: Simplify giterr_detach
branch: move from foreach to an iterator

Create a git_branch_iterator type which is equivalent to the foreach but
lets us write loops instead of callbacks.

Since the introduction of git_reference_shorthand(), the added value of
passing the name is reduced.
Merge pull request #1941 from libgit2/rb/preserve-iterator-error

Preserve error messages during file system iterator cleanup
Fix leaks
Merge pull request #1938 from libgit2/cmn/branch-iterator

branch: move from foreach to an iterator
Merge pull request #1943 from libgit2/ntk/fix/leaks

Fix leaks
merge branch into current, updating workdir
Merge pull request #1007 from ethomson/merge

merge!
Plug git_merge() related leaks