|
38c513b9
|
2010-04-28T19:07:14
|
|
Add support to enable the library to use OpenSSL SHA1 functions
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
19d13c65
|
2010-04-27T17:00:30
|
|
Makefile(s): Don't include the OpenSSL crypto library in the link
Also, fully purge the NO_OPENSSL build variable.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
f019bd17
|
2010-04-27T16:36:52
|
|
Makefile: 'make clean' wipe all editor backup files in src/*/
In a similar way to commit 9b17380 ("Make 'make clean' wipe all
object files in src/*/", 2010-04-14), we use a shell glob when
removing editor backup files.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
44debd80
|
2010-04-27T16:13:57
|
|
Makefile: Add source for the built-in SHA1 routines to $(SRC_C)
This results in the 'sparse' and 'coverage' targets including the
C source files for the built-in SHA1 routines. In addition to the
sparse check, this results in the generation of the '.gcov' file
and inclusion in the test coverage report.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
fb799dfe
|
2010-04-23T09:59:22
|
|
Merge remote branch 'ramsay/dev'
* ramsay/dev:
Add a pack index 'virtual function' to fetch an index entry
Add a pack index 'virtual function' to search by file offset
Change the interface of the pack index search function
Add an 64-bit offset table index bounds check for v2 pack index
Add a minimum size check when opening an v2 pack index file
win32: Add separate MinGW and MSVC compatability header files
Makefile: Add support for custom build options in config.mak file
Fix some coding style issues
|
|
5dddf7c8
|
2010-04-14T20:41:57
|
|
Add block-sha1 in favour of the mozilla routines
Since block-sha1 from git.git has such excellent performance, we
can also get rid of the openssl dependency. It's rather simple
to add it back later as an optional extra, but we really needn't
bother to pull in the entire ssl library and have to deal with
linking issues now that we have the portable and, performance-wise,
truly excellent block-sha1 code to fall back on.
Since this requires a slight revamp of the build rules anyway, we
take the opportunity to fix including EXTRA_OBJS in the final build
as well.
The block-sha1 code was originally implemented for git.git by
Linus Torvalds <torvalds@linux-foundation.org> and was later
polished by Nicolas Pitre <nico@cam.org>.
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
a7335c51
|
2010-04-14T19:40:10
|
|
Add generic buildrule for assembly files
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
9b173803
|
2010-04-14T19:38:38
|
|
Make 'make clean' wipe all object files in src/*/
Instead of naming the subdirectories explicitly (which will result in
us forgetting about one sooner or later), we change the shell glob
pattern to wipe all object files from all subdirectories under src/.
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
56931d1a
|
2010-02-19T20:07:03
|
|
Makefile: Add support for custom build options in config.mak file
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
74eff33f
|
2010-02-01T10:39:10
|
|
Makefile: Add support for building with MSVC
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
1cfb0ff4
|
2009-12-30T19:12:35
|
|
Makefile: Add some missing $(GIT_LIB) dependencies
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
a1c0728d
|
2009-12-21T15:54:50
|
|
Add support for the MinGW platform
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
e4553584
|
2009-08-19T17:06:39
|
|
Add test-suite coverage testing using gcov
Add a new "coverage" Makefile target that re-builds the
library and tests using the gcc compiler/linker flags
required by gcov, runs the test suite to capture the
runtime data, then compiles a coverage report.
The report, which is saved in a file named "untested",
consists of a list of untested files, followed by a list
of untested functions. More detailed execution statistics
are given in the gcov log files which are saved in the
top-level directory (named like src#hash.c.gcov).
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
cac5d927
|
2009-08-27T16:11:07
|
|
Add support for running the tests via valgrind
Add some makefile targets, which use valgrind's memcheck tool to
run the tests, in order to help diagnose memory problems in the
library.
In addition, we enable the '--leak-check' option to report on any
memory leaks. However, unlike the other memory problems reported
by memcheck, memory leak reports do not result in an error exit
from valgrind. (So memory leaks are reported on stderr, but don't
halt the test run.)
A suppressions file (tests.supp) is included since libz triggers
some false positives.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
aee8b26e
|
2009-06-04T17:11:06
|
|
Makefile: move test related targets to a new tests/Makefile
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
cf33ac7a
|
2009-06-04T17:10:17
|
|
Makefile: Add CFLAGS to the "test_main.c" compile target
Also, add the <string.h> include to test_main.c, in order to
suppress the resulting "implicit declaration of strcmp()" warning.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
79ca2edc
|
2009-03-20T19:51:48
|
|
win32: Add routines to abstract memory-mapped file functions
In particular, the git__mmap() and git__munmap() routines provide
the interface to platform specific memory-mapped file facilities.
We provide implementations for unix and win32, which can be found
in their own sub-directories.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
491442f9
|
2009-03-12T22:10:22
|
|
Factor out test helper methods for creating/deleting loose objects
Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
1906f236
|
2009-02-26T20:37:20
|
|
Add built-in (Mozilla) SHA1 routines
Paul agreed to the GCC-exception license by email:
|
| From: Paul Kocher <paul@cryptography.com>
| Date: Sun, 15 Mar 2009 11:37:23 -0700
| Subject: Re: Adding Mozilla SHA1 implementation to libgit2
|
| Yes - that's fine.
|
| At 01:56 AM 3/5/2009, Andreas Ericsson wrote:
| > Hi Paul. We spoke earlier about this, if you remember?
| > We'd like to add the GCC-exception to the GPL license
| > for these files.
Signed-off-by: Paul Kocher <paul@cryptography.com>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
357bf823
|
2009-01-30T22:55:56
|
|
Use install instead of 'cp -f' and 'mkdir -p'.
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
3f84b7d3
|
2009-01-30T22:55:55
|
|
Add libgit2.pc to make clean rule.
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
19af3949
|
2009-01-30T22:55:54
|
|
Add support for installing to a libdir other than 'lib'.
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
521b4e69
|
2009-01-30T22:55:53
|
|
Add DESTDIR support.
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
8ed341c5
|
2008-12-31T21:34:03
|
|
Add a build variable to allow supression of -fvisibility
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
0c01d80a
|
2008-12-31T13:38:47
|
|
Run ranlib on libgit2.a after archiving it
Some linkers require ranlib to build a symbol table on the archive
in order to work with it. Most platforms that don't have this
requirement permit ranlib as a noop.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
007e0753
|
2008-12-27T18:58:25
|
|
Add some routines for SHA1 hash computation
[sp: Changed signature for output to use git_oid, and added
a test case to verify an allocated git_hash_ctx can be
reinitialized and reused.]
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
d7fbfe15
|
2008-12-30T12:10:01
|
|
Add pkg-config support.
The libgit2.pc is generated on make install and installed, to allow
using the lib through the pkg-config helper.
Signed-off-by: Steve Frécinaux <code@istique.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
5ddbd5ed
|
2008-12-30T12:10:00
|
|
Add make install and uninstall targets.
It accepts a prefix= parameter (default: /usr/local).
Signed-off-by: Steve Frécinaux <code@istique.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
3d3552e8
|
2008-12-18T22:58:10
|
|
Implement git_odb__read_loose()
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
def425bf
|
2008-12-18T08:20:50
|
|
Remove references to src/git/config.h
It was removed in ec250c6e18e56d12714f9010e1b15e5feec5f473.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
c18626ee
|
2008-12-18T08:17:05
|
|
Run tests in their own subdirectory
This way tests can run in parallel without stepping on each other's
temporary work files. If a test passes the directory is removed
completely; if a test fails only empty directories are removed.
This permits inspection of the failed test's left behind state.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
17643760
|
2008-11-29T19:20:07
|
|
Use __CHECKER__ to detect when sparse is running
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
80133dad
|
2008-11-29T19:19:31
|
|
Use cgcc in the sparse target
cgcc is the recommended way to run sparse, since it provides
many -Defines suitable to the given gcc platform. For example,
on some Ubuntu/glibc versions, a plain sparse invocation gives
the following warning:
"warning: This machine appears to be neither x86_64 nor i386."
Using "cgcc -no-compile" instead eliminates this warning.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
ec250c6e
|
2008-11-23T22:37:55
|
|
Remove config.h and make fileops an internal API
Since it doesn't make sense to make the disk access stuff
portable *AND* public (that's a job for each application
imo), we can take a shortcut and just support unixy stuff
for now and get away with coding most of it as macros.
Since we go with an internal API for starters and only
provide higher-level API's to the libgit users, we'll be
ok with this approach.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
21648b45
|
2008-11-22T15:25:59
|
|
Make src/git/config.h a macro in Makefile
This makes it far more convenient to reference as a dependency
for other targets.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
6013ffa6
|
2008-11-22T15:33:15
|
|
Add $(CONFIG_H) as a build-dependency for sparse
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
ff7c7576
|
2008-11-22T13:05:32
|
|
s/COPYING/.HEADER/ for install-headers target
We don't want to prepend the entire license; Only the
file header part of it.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
3e1d42b7
|
2008-11-18T22:17:40
|
|
Add a 'sparse' make target
Given the confusion on git@vger, we'd better not name
this target "check" or (worse) "test", but it's still
useful to have. As "sparse", noone should have problems
understanding what it does.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
4f0adcd0
|
2008-11-18T21:28:55
|
|
Get rid of GIT__PRIVATE macro
Using it in the first place means something's wrong.
This patch replaces it with an internal header which
carries the previously "protected" code instead.
Internal source-files simply include "commit.h" and
they're done. The internal header includes the public
one to make sure we always use the proper prototype.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
ae234862
|
2008-11-18T22:20:15
|
|
Add an embryo of a TLS-aware error handling system
This adds the per-thread global variable git_errno to the
system, which callers can examine to get information about
an error.
Two helper functions are added to reduce LoC-count for the
library code itself.
Also, some exceptions are made for running sparse on GIT_TLS
definitions, since it doesn't grok thread-local variables at
all.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
ab3f234e
|
2008-11-22T15:35:31
|
|
Make using CFLAGS a bit simpler
This patch introduces the $(ALL_CFLAGS) variable, which holds
$(BASIC_CFLAGS) as well as userdefined $(CFLAGS) and then
consistently uses that variable where both were used anyway.
Since we're in the area, we optimize the sparse running a
bit, getting rid of the shell and just letting sparse iterate
over the files.
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>
|
|
a57e9a8c
|
2008-11-18T01:27:29
|
|
Add a fake and phony install-headers target
It actually does what it's supposed to (more or less),
but not very portably and not to the correct directory.
Signed-off-by: Andreas Ericsson <ae@op5.se>
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>
|
|
b923f2f9
|
2008-11-03T17:00:54
|
|
Fix Makefile to correctly handle 'make -j4 test'
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>
|
|
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>
|
|
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>
|
|
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>
|
|
13ce9f1b
|
2008-10-31T12:28:49
|
|
Fix Makefile targets to correctly depend on *.h files
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
b39843f3
|
2008-10-31T11:44:00
|
|
Use wildcard to avoid listing out all source files by hand
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
7335ffc3
|
2008-10-31T11:37:58
|
|
Begin a description of our naming and coding conventions
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>
|