Fix GIT_MERGE_OPTS_INIT on MSVC.
Remove ignored files from the working directory if they were stashed
Merge pull request #2155 from jacquesg/stash-save-remove-ignored

Remove ignored files from the working directory if they were stashed
pack-objects: free memory safely

A few fixes have accumulated in this area which have made the freeing of
data a bit muddy. Make sure to free the data only when needed and once.

When we are going to write a delta to the packfile, we need to free the
data, otherwise leave it. The current version of the code mixes up the
checks for po->data and po->delta_data.
Merge pull request #2157 from libgit2/cmn/write-object-mem

pack-objects: free memory safely
Add exists_prefix to ODB backend and ODB API
Add git_object_short_id API to get short id string

This finds a short id string that will unambiguously select the
given object, starting with the core.abbrev length (usually 7)
and growing until it is no longer ambiguous.
examples/diff: Add minimal, patience diff options.

- Add minimal, patience diff options to diff example. libgit2
  `diff_xdiff.git_xdiff_init` already supports these flags, so
  no additional change is necessary.
- Remove minimal and patience flag addition from project list.
Fixed missing error check on call to git_remote_download in git_remote_fetch. Moved error check to statement following git_remote_disconnect so that the disconnect happens regardless of the result of the download call.
Merge pull request #2161 from softwarenerd/softwarenerd

Fixed missing error check on call to git_remote_download
Merge pull request #2160 from modocache/examples-diff-add-patience-and-minimal

examples/diff: Add minimal, patience diff options.
Add the --shortstat flag to examples/diff.c
fix the output format of diff
Fix typo
Add tag example
Move all variable declarations to the top of the block
ODB writing fails gracefully when unsupported

If no ODB backends support writing, we should fail gracefully.
refdb: catch a directory disappearing

If a directory disappears between the time we look up the entries of its
parent and the time when we go to look at it, we should ignore the error
and move forward.

This fixes #2046.
Merge pull request #2163 from ethomson/nobackend_odb_write

ODB writing fails gracefully when unsupported
Merge pull request #2164 from libgit2/cmn/refs-delete-iteration

refdb: catch a directory disappearing