|
2dbdb824
|
2008-11-03T18:38:57
|
|
Add git_fsize to the os file API
This permits us to get the size of an opened file.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
3e9e6909
|
2008-11-03T17:14:25
|
|
Redefine git_fread, git_fwrite to transfer the whole unit
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>
|
|
b7c891c6
|
2008-11-03T17:31:16
|
|
Add git_oid_cpy, git_oid_cmp as inline functions
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>
|
|
fbbfdf9f
|
2008-11-03T16:29:56
|
|
Move GIT_NORETURN into test_lib.h only
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>
|
|
3b8ab0b9
|
2008-11-03T16:29:03
|
|
Fix GIT_EXTERN to actually mark the prototype as extern
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
8722a77e
|
2008-11-03T17:52:59
|
|
Correct indentation in git/odb.h
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
15bffce9
|
2008-11-01T18:14:22
|
|
Create a basic test suite for the library and test oid functions
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>
|
|
16a67770
|
2008-11-01T16:53:06
|
|
Create a micro abstraction around the POSIX file APIs
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>
|
|
50298f44
|
2008-11-01T15:55:01
|
|
Switch the license from BSD to GPL+libgcc exception
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
d1ea30c3
|
2008-11-01T15:42:23
|
|
Move include files to include/git/, drop git_ prefix from file names
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|