- 18 Nov, 2008 2 commits
-
-
It doesn't make sense to use "git/somefile.h" in the public git headers, as it's quite likely that projects using them will have a git directory themselves. This alters it, making the public headers look for headers in the same directory they themselves are in. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Andreas Ericsson committed -
Since re-using code from git.git proper is the quick way forward, we need to list those who have given their consent to do just that. The relicense permission is only valid for use with libgit2, and only for GPLv2 + gcc-exception (as specified by 'COPYING'. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Andreas Ericsson committed
-
- 04 Nov, 2008 12 commits
-
-
Some versions of zlib don't have a deflateBound defined, so we define it ourselves after including zlib.h. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Far from being complete, but its a good start. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
This permits us to get the size of an opened file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
We never want to accept a short read or a short write when transferring data to or from a local file. Either the entire read (or write) completes or the operation failed and we will not recover gracefully from it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
These are easily built off the standard C library functions memcpy and memcmp. By marking these inline we stand a good chance of the C compiler replacing the entire thing with tight machine code, because many compilers will actually inline a memcmp or memcpy when the 3rd argument (the size) is a constant value. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
We only want hex digits to be read, any other character in the 8-bit character set is invalid within an id string. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
By passing the name of the test function on the command line we execute exactly that one test, and then exit successfully if the test did not fail. This permits multiple functions in the same .c file, so they could be called from a shell script or debugged independently externally. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
If we have more than one test build running we cannot use the same file for each test case; instead we need to use a per-test path so there aren't any collisions. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
We should never have a noreturn style function in the library itself, as such a function would prevent the calling application from handling error conditions the way it wants. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
-
- 02 Nov, 2008 1 commit
-
-
This is a horribly simple test suite that makes it fairly easy to put together some basic function level unit tests on the library. Its patterned somewhat after the test suite in git.git, but also after the "Check" test library. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
-
- 01 Nov, 2008 7 commits
-
-
This way we can start to write IO code to read and write files in the Git object database, but provide a hook to inject native Win32 APIs instead so libgit2 can be ported to run natively on that platform. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
This isn't the best idea I've head. Pierre Habouzit was suggesting a technique of assigning a unique integer to each commit and then allocating storage out of auxiliary pools, using the commit's unique integer to index into any auxiliary pool in constant time. This way both applications and the library can efficiently attach arbitrary data onto a commit, such as rewritten parents, or flags, and have them disconnected from the main object hash table. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
This seems to be preferred on the mailing list. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
-
- 31 Oct, 2008 16 commits
-
-
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Pierre Habouzit committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
This way only structures we ask the caller to allocate on their call stack or which we want to allow them to use members from are shown in the API docs. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Most read calls will use the small object format, as the majority of the content within the database is very small objects (under 20 KB when inflated). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed -
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
-