Merge branch 'development'
Merge branch 'development'
filebuf: make unlocking atomic

When renaming a lock file to its final location, we need to make sure
that it is replaced atomically.

We currently have a workaround for Windows by removing the target file.
This means that the target file, which may be a ref or a packfile, may
cease to exist for a short wile, which shold be avoided.

Implement the workaround only in Windows, by making sure that the file
we want to replace is writable.
treebuilder: use a map instead of vector to store the entries

Finding a filename in a vector means we need to resort it every time we
want to read from it, which includes every time we want to write to it
as well, as we want to find duplicate keys.

A hash-map fits what we want to do much more accurately, as we do not
care about sorting, but just the particular filename.

We still keep removed entries around, as the interface let you assume
they were going to be around until the treebuilder is cleared or freed,
but in this case that involves an append to a vector in the filter case,
which can now fail.

The only time we care about sorting is when we write out the tree, so
let's make that the only time we do any sorting.
treebuilder: don't keep removed entries around

If the user wants to keep a copy for themselves, they should make a
copy. It adds unnecessary complexity to make sure the returned entries
are valid until the builder is cleared.
treentry: no need for manual size book-keeping

We can simply ask the hasmap.
libgit2 v0.21.0
Update CONTRIBUTING and PROJECTS

This updates CONTRIBUTING to reflect the changes to use the
master branch and make explicit recommendations about updating
CHANGELOG.md and providing test coverage.  Also, this includes
some old updates to PROJECTS.md that I wrote to expand the list
of projects, pulling in things from old feature requests.
missing paren
Merge remote-tracking branch 'upstream/cmn/filebuf-atomic-unlock'
Add a CHANGELOG entry for the filebuf change
Share packs across repository instances

Opening the same repository multiple times will currently open the same
file multiple times, as well as map the same region of the file multiple
times. This is not necessary, as the packfile data is immutable.

Instead of opening and closing packfiles directly, introduce an
indirection and allocate packfiles globally. This does mean locking on
each packfile open, but we already use this lock for the global mwindow
list so it doesn't introduce a new contention point.
Merge pull request #2434 from libgit2/rb/contributing-updates

Update CONTRIBUTING and PROJECTS
Merge branch 'cmn/global-mwf'
Add CHANGELOG entry for shared packs
Merge remote-tracking branch 'upstream/cmn/treebuilder-perf'
Add CHANGELOG entry for treebuilder map
git_blob_is_binary() calls git_buf_text_contains_nul()

Drop git_buf_text_is_binary()