We now depend on libpthread on all Unix platforms (should be installed
by default) and use a simple wrapper for Windows threads under Win32.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
I don't know if this is good or bad. This lets libgit2 compile cleanly
on any platforms without any external dependencies, but adds a little
bit of bloat...
Let's test this out and see what happens.
A version *so* awesome that needs 2 version bumps AND a codename.
Major features:
- New internal garbage collection (harder)
- Pack backend rewritten from scratch (better)
- Revision walker rewritten from scratch (faster)
- New object interdependency system (stronger)
- Unique OID shortener
- Reference listing
In honor of one heck of a music album, released ten years ago,
yesterday.
We now have proper sonames in Mac OS X and Linux, proper versioning on
the pkg-config file and proper DLL naming in Windows.
The version of the library is defined exclusively in 'src/git2.h'; the build scripts
read it from there automatically.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Configure again the build system to look for SQLite3. If the library is
found, the SQLite backend will be automatically compiled.
Enjoy *very* fast reads and writes.
MASTER PROTIP: Initialize the backend with ":memory" as the path to the
SQLite database for fully-hosted in-memory repositories. Rejoice.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
NIH Enterprises presents: a new testing system based on CuTesT, which is
faster than our previous one and fortunately uses no preprocessing on
the source files, which means we can run that from CMake.
The test suites have been gathered together into bigger files (one file
per suite, testing each of the different submodules of the library).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Major changes and rationale:
- /WX: absolutely vital when compiling in C-mode as the compiler is
incredibly lenient on what is allowed to compile. It allows functions to be
called without prototypes declared, treating them as functions returning int
taking an unspecified (read: unrestricted) list of arguments, without any
type checking! It will simply issue a warning, which is easily overlooked.
A real example: it will allow you to call ceil(1.75) without first including
<math.h> causing UB, returning bogus results like 1023 on the machine I
tested on.
- Release build separate from debug.
Presently release builds don't exist. Consequently they are completely
untested. Many bugs may only manifest themselves in release mode. The current
configuration sets debug-only flags like /RTC1 which are incompatible with
optimization (/O2).
In addition, the Windows build of libgit2 has no optimized version. This
change resolves this.
- Added checksum generation in image headers. This is so debuggers don't
complain about checksum mismatches and provides a small amount of consistency
to binaries.
Don't hardcode the '/sbin/ldconfig' path; also, don't run anything if
ldconfig cannot be found (Mac OS X, for instance).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
The test runner was running the manifest and other crap files. Now it
filters out to just the executables.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Fix the test building issues once for all; each test is linked
with the raw objects of the library, not with any compiled version. That
way we make sure the tests always run, and are always linked with the
latest and most up-to-date version of the code.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Libgit2 is now officially include as
#include "<git2.h>"
or indidividual files may be included as
#include <git2/index.h>
Signed-off-by: Vicent Marti <tanoku@gmail.com>
The maze with include dependencies has been fixed.
There is now a global include:
#include <git.h>
The git_odb_backend API has been exposed.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Currently, libgit2 compiles and passes all tests under MinGW, and
compiles but fails the test suite on MSVC 2010.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
The libgit2 shared library must be linked with all the dynamic libraries
it depends (z, openssl).
These libraries are now automatically detected during the configuration
phase.
Also, removed the linking dependency on libgit2 which Scott added: if
you link libgit2 with itself, the universe could implode, and we don't
want that to happen.
Signed-off-by: Vicent Marti <tanoku@gmail.com>