|
36f0f61f
|
2008-11-18T19:06:25
|
|
Add compiler/platform agnostic thread-local storage
It doesn't cover all cases, but we can work on those as
we go along. For now, gcc, MSVC++, Intel C/C++, IBM XL C/C++,
Sun Studio C/C++ and Borland C++ Builder are the supported
compilers (although we boldly assume that they all are of
a recent enough version to support thread-local storage).
This is intended to be used in upcoming patches that implement
graceful (but TLS-dependant) error-handling in the library.
As an added bonus, we also bring the online_cpus() function
from git.git to detect the number of usable cpu's.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
1b9e92c7
|
2008-11-18T01:02:27
|
|
s/git_revp/git_revpool/
git_revp is something I personally can't stop pronouncing
"rev pointer". I'm sure others would suffer the same
problem.
Also, rename the git_revp_ sub-api "gitrp_". This is the
first of many such renames, primarily done to prevent
extreme inflation in the "git_" namespace, which we'd like
to reserve for a higher-level API.
While we're at it, we remove the noise-char "c" from a lot
of functions. Since revision walking is all about commits,
the common case should be that we're dealing with commits.
Exceptions can get a more mnemonic description as needed.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
dff79e27
|
2008-11-18T00:59:36
|
|
Rename "git_sobj" "git_obj"
The 's' never really made sense, since it's not a "small"
object at all, but rather a plain object. As such, it should
have a "plain" object name.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
d4043ee9
|
2008-11-18T01:18:52
|
|
Move public headers to src/git
It's arguably smoother to keep them close to the source,
as that's where one's working when modifying them. More
importantly, though, is the ability to use private headers
in the src/ dir that simply include "git/$samename.h" to
get to the public API at the same time.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
1699efc4
|
2008-11-03T18:39:37
|
|
Implement some of the basic git_odb open and close API
Far from being complete, but its a good start.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
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>
|
|
b3a2f90e
|
2008-11-03T18:00:49
|
|
Enable warnings by default and fix warning in oid.c
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>
|
|
3e89665e
|
2008-10-31T18:34:02
|
|
Scratch the git_revp_attr configuration of a git_revp
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>
|
|
6533aadc
|
2008-10-31T18:23:01
|
|
Drop the _t suffix as it is a POSIX reserved namespace
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
de2220a4
|
2008-10-31T18:16:26
|
|
Replace git_result_t with int
This seems to be preferred on the mailing list.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
4f9339df
|
2008-10-31T15:10:51
|
|
Hide non-exported symbols when linking the library
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
06160502
|
2008-10-31T12:30:28
|
|
Take the first stab at defining revision traversal
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
8edc2805
|
2008-10-31T11:46:51
|
|
Correct group name of the git_odb module
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
29f0e90f
|
2008-10-31T11:04:48
|
|
Add _t suffix to all data types
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
bce499af
|
2008-10-31T11:01:28
|
|
Add a GIT_ prefix to OBJ_ constants to scope them better
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
b51eb250
|
2008-10-31T10:55:58
|
|
Cleanup git_odb documentation formatting
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
111d5ccf
|
2008-10-31T10:56:18
|
|
Add a git_sobj_close to release the git_sobj data
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
1cd20d3a
|
2008-10-31T10:57:04
|
|
Hide git_odb's internal structure from applcation code
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>
|
|
46d8b885
|
2008-10-31T10:43:20
|
|
Rename git_odb_sread to just git_odb_read
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>
|
|
44181c23
|
2008-10-31T10:42:32
|
|
Mark git_oid parameters const when they shouldn't be modified
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
c15648cb
|
2008-10-31T09:57:29
|
|
Initial draft of libgit2
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|