summaryrefslogtreecommitdiff
path: root/include/git
Commit message (Collapse)AuthorAgeFilesLines
* Move public headers to src/gitAndreas Ericsson2008-11-188-697/+0
| | | | | | | | | | | 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>
* s/git_revp/git_revpool/Andreas Ericsson2008-11-183-8/+8
| | | | | | | | | | | | | | | | | | | 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>
* Rename "git_sobj" "git_obj"Andreas Ericsson2008-11-181-5/+5
| | | | | | | | | 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>
* Use same-directory include for public headersAndreas Ericsson2008-11-185-9/+9
| | | | | | | | | | | 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>
* Add a zlib support shellShawn O. Pearce2008-11-031-0/+60
| | | | | | | 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>
* Implement some of the basic git_odb open and close APIShawn O. Pearce2008-11-031-3/+6
| | | | | | Far from being complete, but its a good start. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add git_fsize to the os file APIShawn O. Pearce2008-11-031-0/+14
| | | | | | This permits us to get the size of an opened file. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Redefine git_fread, git_fwrite to transfer the whole unitShawn O. Pearce2008-11-031-29/+26
| | | | | | | | | | 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>
* Add git_oid_cpy, git_oid_cmp as inline functionsShawn O. Pearce2008-11-033-1/+29
| | | | | | | | | | 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>
* Fix GIT_EXTERN to actually mark the prototype as externShawn O. Pearce2008-11-031-2/+4
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Move GIT_NORETURN into test_lib.h onlyShawn O. Pearce2008-11-031-7/+0
| | | | | | | | 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>
* Correct indentation in git/odb.hShawn O. Pearce2008-11-031-2/+2
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Create a basic test suite for the library and test oid functionsShawn O. Pearce2008-11-011-0/+14
| | | | | | | | | 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>
* Create a micro abstraction around the POSIX file APIsShawn O. Pearce2008-11-015-10/+153
| | | | | | | | 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>
* Switch the license from BSD to GPL+libgcc exceptionShawn O. Pearce2008-11-015-145/+95
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Move include files to include/git/, drop git_ prefix from file namesShawn O. Pearce2008-11-015-0/+493
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>