examples: add ls-remote, fetch and index-pack examples

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
tests-clay: update clay

The clay script didn't match the latest version from upstream.
Additionaly, add core/strtol.c to complete porting the core tests to
clay.

Signed-off-by: schu <schu-github@schulog.org>
tests-clay: add a readme file

Signed-off-by: schu <schu-github@schulog.org>
Merge pull request #446 from schu/tests-clay-update

tests-clay: update
Merge pull request #439 from carlosmn/network-examples

Add network examples
A missing refspec is not an error

It's rare for a configured remote, but for one given as an URL on the
command line, it's more often than not the case.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
fetch: store FETCH_HEAD

We should always save the remote's HEAD as FETCH_HEAD locally.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
fix build for x64

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #447 from csware/fix-win64-build

fix build for x64
libgit2 doesn't use -LIB define

Signed-off-by: Sven Strickroth <email@cs-ware.de>
put version information in separate file

Signed-off-by: Sven Strickroth <email@cs-ware.de>
include version information in git2.dll on Windows

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #444 from carlosmn/fetch-fixes

A couple of fetch fixes
fetch: move 'head' so it's visible to the whole function

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
CMake: Only add the STDCALL option when using MSVC

This option is only ever used with MSVC.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
CMake: don't overwrite the user's CFLAGS

If either CFLAGS is defined or the user passes -DCMAKE_C_FLAGS to
cmake, the variable already contains flags. Don't overwrite them, but
append them to our settings.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Explain how to build universal OSX binaries

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Merge pull request #452 from carlosmn/cmake-respect-user

Assorted CMake fixes
Merge pull request #449 from csware/include-win-version-information

Include windows version information in git2.dll
msvc: Fix resourc embedding