|
87d82994
|
2011-02-02T02:32:21
|
|
Make the test return an error code on failure
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2a1732b4
|
2011-02-02T02:15:25
|
|
Rewrite the unit testing suite
NIH Enterprises presents: a new testing system based on CuTesT, which is
faster than our previous one and fortunately uses no preprocessing on
the source files, which means we can run that from CMake.
The test suites have been gathered together into bigger files (one file
per suite, testing each of the different submodules of the library).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2f8a8ab2
|
2011-01-29T01:56:25
|
|
Refactor reference parsing code
Several changes have been committed to allow the user to create
in-memory references and write back to disk. Peeling of symbolic
references has been made explicit. Added getter and setter methods for
all attributes on a reference. Added corresponding documentation.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
9282e921
|
2010-12-27T20:34:19
|
|
Merge nulltoken's reference parsing code
All the commits have been squashed into a single one before refactoring
the final code, to keep everything tidy.
Individual commit messages are as follows:
Added repository reference looking up functionality placeholder.
Added basic reference database definition and caching infrastructure.
Removed useless constant.
Added GIT_EINVALIDREFNAME error and description. Added missing description for GIT_EBAREINDEX.
Added GIT_EREFCORRUPTED error and description.
Added GIT_ETOONESTEDSYMREF error and description.
Added resolving of direct and symbolic references.
Prepared the packed-refs parsing.
Added parsing of the packed-refs file content.
When no loose reference has been found, the full content of the packed-refs file is parsed. All of the new (i.e. not previously parsed as a loose reference) references are eagerly stored in the cached references storage.
The method packed_reference_file__parse() is in deer need of some refactoring. :-)
Extracted to a method the parsing of the peeled target of a tag.
Extracted to a method the parsing of a standard packed ref.
Fixed leaky removal of the cached references.
Ensured that a previously parsed packed reference isn't returned if a more up-to-date loose reference exists.
Enhanced documentation of git_repository_reference_lookup().
Moved some refs related constants from repository.c to refs.h.
Made parsing of a packed tag reference more robust.
Updated git_repository_reference_lookup() documentation.
Added some references to the test repository.
Added some tests covering tag references looking up.
Added some tests covering symbolic and head references looking up.
Added some tests covering packed references looking up.
|
|
2e6fd09c
|
2011-01-25T21:52:24
|
|
Fixed naming convention related issue.
|
|
618818dc
|
2011-01-23T16:15:11
|
|
Added git_prettify_file_path().
|
|
ae7ffea9
|
2011-01-22T14:04:32
|
|
Fixed a parsing issue in git_prettify_dir_path().
|
|
b29e8f19
|
2011-01-29T02:12:59
|
|
Return the created entry in git_tree_add_entry()
Yes, we are breaking the API. Alpha software, deal with it.
We need a way of getting a pointer to each newly added entry to the
index, because manually looking up the entry after creation is
outrageously expensive.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
e16c2f6a
|
2011-01-20T19:51:34
|
|
Small enhancements to git_prettify_dir_path().
- Secured buffer ahead reading.
- Guard against potential multiple dot path traversal (cf http://cwe.mitre.org/data/definitions/33.html)
|
|
e08b246c
|
2011-01-19T17:20:39
|
|
Fix signed/unsigned comparison warning
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
170d3f2f
|
2011-01-11T20:12:53
|
|
Added git_prettify_dir_path().
Clean up a provided absolute or relative directory path.
This prettification relies on basic operations such as coalescing multiple forward slashes into a single slash, removing '.' and './' current directory segments, and removing parent directory whenever '..' is encountered. If not empty, the returned path ends with a forward slash.
For instance, this will turn "d1/s1///s2/..//../s3" into "d1/s3/".
This only performs a string based analysis of the path. No checks are done to make sure the path actually makes sense from the file system perspective.
|
|
a17777d1
|
2011-01-07T11:35:43
|
|
Fixed two buffer handling errors in vector.c
- remove() would read one-past array bounds.
- resize() would fail if the initial size was 1, because it multiplied by 1.75
and truncated the resulting value. The buffer would always remain at size 1,
but elements would repeatedly be appended (via insert()) causing a crash.
|
|
9f54fe48
|
2010-12-23T00:15:09
|
|
Remove git_errno
It was not being used by any methods (only by malloc and calloc), and
since it needs to be TLS, it cannot be exported on DLLs on Windows.
Burn it with fire. The API always returns error codes!
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
638c2ca4
|
2010-12-18T02:10:25
|
|
Rename 'git_person' to 'git_signature'
The new signature struct is public, and contains information about the
timezone offset. Must be free'd manually by the user.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
5cccfa89
|
2010-12-12T00:33:57
|
|
Merge branch 'timezone-offset' of https://github.com/nulltoken/libgit2 into timezone
|
|
5b8bb8e7
|
2010-12-07T00:54:33
|
|
Minor modifications for MinGW/Cygwin compatibility.
|
|
b76d984e
|
2010-12-11T16:20:57
|
|
Added more person parsing tests.
|
|
5a386e4d
|
2010-12-11T15:50:07
|
|
Added timezone checks to person parsing tests.
|
|
7161beb1
|
2010-12-11T15:38:22
|
|
Fixed too much faked timezone offset.
An offset of more than 14 hours makes no sense (cf. http://www.worldtimezone.com/faq.html).
|
|
13710f1e
|
2010-12-10T16:30:06
|
|
Added timezone offset parsing and outputting.
|
|
2cd6d686
|
2010-12-10T05:53:39
|
|
Tests now run with the resources folder as a hardcoded path
Each tests expects a "TEST_RESOURCES" define with the full path to the
resources folder.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
a44fc1d4
|
2010-12-06T23:13:00
|
|
Fix type-conversion warnings
The types in the git_index_entry struct are now system-defaults, and get
truncated to uint32_t's when written back on the index.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
44908fe7
|
2010-12-06T23:03:16
|
|
Change the library include file
Libgit2 is now officially include as
#include "<git2.h>"
or indidividual files may be included as
#include <git2/index.h>
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
d12299fe
|
2010-12-03T22:22:10
|
|
Change include structure for the project
The maze with include dependencies has been fixed.
There is now a global include:
#include <git.h>
The git_odb_backend API has been exposed.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
7d7cd885
|
2010-12-03T18:01:30
|
|
Decouple storage from ODB logic
Comes with two default backends: loose object and packfiles.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
654cd5ff
|
2010-12-02T21:50:28
|
|
Fix segfault in t0603 (unitialized pointer)
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
59995558
|
2010-12-02T21:48:03
|
|
Fix segfault handler in Mac OS X
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
eec95235
|
2010-12-02T04:58:22
|
|
Commit parents now use the common 'vector' code
No more linked lists, no more O(n) access.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
41109a7e
|
2010-12-02T04:42:33
|
|
Merge branch 'commitparents' of https://github.com/JustinLove/libgit2 into JustinLove-commitparents
|
|
c4034e63
|
2010-12-02T04:31:54
|
|
Refactor all 'vector' functions into common code
All the operations on the 'git_index_entry' array and the
'git_tree_entry' array have been refactored into common code in the
src/vector.c file.
The new vector methods support:
- insertion: O(1) (avg)
- deletion: O(n)
- searching: O(logn)
- sorting: O(logn)
- r. access: O(1)
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1e35f929
|
2010-12-02T04:19:14
|
|
Add stack trace to the tests when building with GCC
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
eb095435
|
2010-11-30T21:28:39
|
|
add git_commit_parent to retrieve a parent by index
|
|
12114415
|
2010-11-30T21:01:47
|
|
add git_commit_parentcount
|
|
277e45f4
|
2010-11-23T22:36:31
|
|
Remove the Makefile from the tests/ folder too
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
6b1eab39
|
2010-11-23T14:36:31
|
|
Fix MSVC warnings and errors
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
d7c7cab8
|
2010-11-16T03:25:26
|
|
Fix memory leak in t0401
Commit object must be internally free'd after each parse attempt, even
it fails.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c3a20d5c
|
2010-11-14T22:11:46
|
|
Add support for 'index add'
Actually add files to the index by creating their corresponding blob and
storing it on the repository, then getting the hash and updating the
index file.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1081d909
|
2010-11-05T18:04:46
|
|
Fix parsing of commits that have no newlines in the message.
|
|
88d035bd
|
2010-11-04T15:08:01
|
|
Update commit_time along with committer.
|
|
f24fa088
|
2010-11-04T15:06:56
|
|
Test that commit attributes are set correctly.
|
|
a8bfce69
|
2010-11-05T03:50:24
|
|
Add string descriptions for all error codes
Old descriptions have been updated and new ones have been added for the
'git_strerror' function.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1795f879
|
2010-11-05T03:20:17
|
|
Improve error handling
All initialization functions now return error codes instead of pointers.
Error codes are now properly propagated on most functions. Several new
and more specific error codes have been added in common.h
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
6fd195d7
|
2010-11-02T18:42:42
|
|
Change git_repository initialization to use a path
The constructor to git_repository is now called
'git_repository_open(path)'
and takes a path to a git repository instead of an existing ODB object.
Unit tests have been updated accordingly and the two test repositories
have been merged into one.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
aaf68dc4
|
2010-10-29T00:47:53
|
|
Add unit tests for git_odb_read_header
Test the new method by loading all the objects in the sample ODB with a
full-read and a header-only read, and comparing the types and sizes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
58519018
|
2010-10-28T02:07:18
|
|
Fix internal memory management on the library
String mememory is now managed in a much more sane manner.
Fixes include:
- git_person email and name is no longer limited to 64 characters
- git_tree_entry filename is no longer limited to 255 characters
- raw objects are properly opened & closed the minimum amount of
times required for parsing
- unit tests no longer leak
- removed 5 other misc memory leaks as reported by Valgrind
- tree writeback no longer segfaults on rare ocassions
The git_person struct is no longer public. It is now managed by the
library, and getter methods are in place to access its internal
attributes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2d16373c
|
2010-10-12T19:12:50
|
|
msvc: Fix an "conversion, possible loss of data" warning
In particular, msvc complains thus:
t0603-sort.c(23) : warning C4244: 'function' : conversion from \
'time_t' to 'unsigned int', possible loss of data
Note that msvc, by default, defines time_t as a 64-bit type, whereas
srand() is expecting an (32-bit) unsigned int. In order to suppress
the warning, we simply cast the return value of the time() function
call to 'unsigned int'.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
e4def81a
|
2010-10-08T13:52:17
|
|
Fix issue 3 (memory corruption resize_tree_array)
The tree array wasn't being initialized when instantiating a tree object
in memory instead of loading it from disk.
New unit tests added to check for the problem.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0ba7a031
|
2010-10-07T00:42:55
|
|
Add unit tests for object write-back
Basic write-back & in-memory editing for objects is now tested in t0403
(commits), t0802 (tags) and t0902 (trees).
Add new helper functions in test_helpers.c to remove the loose objects
created when doing write-back tests.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c4b5bedc
|
2010-10-07T00:07:32
|
|
Fix possible segfaults in src/tree.c (issue 1)
git_tree_entry_byname was dereferencing a NULL pointer when the searched
file couldn't be found on the tree.
New test cases have been added to check for entry access methods.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2a884588
|
2010-09-21T17:17:10
|
|
Add write-back support for git_tree
All the setter methods for git_tree have been added, including the
setters for attributes on each git_tree_entry and methods to add/remove
entries of the tree.
Modified trees and trees created in-memory from scratch can be written
back to the repository using git_object_write().
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
0c3596f1
|
2010-09-20T01:57:53
|
|
Add setter methods & write support for git_commit
All the required git_commit_set_XXX methods have been implemented; all
the attributes of a commit object can now be modified in-memory.
The new method git_object_write() automatically writes back the
in-memory changes of any object to the repository. So far it only
supports git_commit objects.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
f49a2e49
|
2010-09-19T03:21:06
|
|
Give object structures more descriptive names
The 'git_obj' structure is now called 'git_rawobj', since
it represents a raw object read from the ODB.
The 'git_repository_object' structure is now called 'git_object',
since it's the base object class for all objects.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
003c2690
|
2010-08-12T18:45:31
|
|
Finish the tree object API
The interface for loading and parsing tree objects from a repository has
been completed with all the required accesor methods for attributes,
support for manipulating individual tree entries and a new unit test
t0901-readtree which tries to load and parse a tree object from a
repository.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
ff17642d
|
2010-07-19T15:35:52
|
|
Add unit tests for index manipulation
Three new unit tests, t06XX files have been added.
t0601-read: tests for loading index files from disk,
for creating in-memory indexes and for accessing
index entries.
t0602-write: tests for writing index files back to disk
t0603-sort: tests for properly sorting the entries array of an index
Two test indexes have been added in 'tests/resources/':
test/resources/index: a sample index from a libgit2 repository
test/resources/gitgit.index: a sample index from a git.git
repository (includes TREE extension data)
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1baa25ee
|
2010-07-20T23:56:18
|
|
Move test resources to a common directory
All the external resources used by the tests are now placed inside the
common 'tests/resources' directory.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
3315782c
|
2010-08-08T14:12:17
|
|
Redesigned the walking/object lookup interface
The old 'git_revpool' object has been removed and
split into two distinct objects with separate
functionality, in order to have separate methods for
object management and object walking.
* A new object 'git_repository' does the high-level
management of a repository's objects (commits, trees,
tags, etc) on top of a 'git_odb'.
Eventually, it will also manage other repository
attributes (e.g. tag resolution, references, etc).
See: src/git/repository.h
* A new external method
'git_repository_lookup(repo, oid, type)'
has been added to the 'git_repository' API.
All object lookups (git_XXX_lookup()) are now
wrappers to this method, and duplicated code
has been removed. The method does automatic type
checking and returns a generic 'git_revpool_object'
that can be cast to any specific object.
See: src/git/repository.h
* The external methods for object parsing of repository
objects (git_XXX_parse()) have been removed.
Loading objects from the repository is now managed
through the 'lookup' functions. These objects are
loaded with minimal information, and the relevant
parsing is done automatically when the user requests
any of the parsed attributes through accessor methods.
An attribute has been added to 'git_repository' in
order to force the parsing of all the repository objects
immediately after lookup.
See: src/git/commit.h
See: src/git/tag.h
See: src/git/tree.h
* The previous walking functionality of the revpool
is now found in 'git_revwalk', which does the actual
revision walking on a repository; the attributes
when walking through commits in a database have been
decoupled from the actual commit objects.
This increases performance when accessing commits
during the walk and allows to have several
'git_revwalk' instances working at the same time on
top of the same repository, without having to load
commits in memory several times.
See: src/git/revwalk.h
* The old 'git_revpool_table' has been renamed to
'git_hashtable' and now works as a generic hashtable
with support for any kind of object and custom hash
functions.
See: src/hashtable.h
* All the relevant unit tests have been updated, renamed
and grouped accordingly.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
f8758044
|
2010-08-07T01:02:20
|
|
Add loading and parsing of tag objects
Tag objects are now properly loaded from the revision pool.
New test t0801 checks for loading a parsing a series of tags, including
the tag of a tag.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
364788e1
|
2010-08-07T00:59:58
|
|
Refactor parsing methods
The 'parse_oid' and 'parse_person' methods which were used by the commit
parser are now global so they can be used when parsing other objects.
The 'git_commit_person' struct has been changed to a generic
'git_person'.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
7e4f56a5
|
2010-08-06T18:37:59
|
|
Add packfile reading
Packed objects inside packfiles are now properly unpacked when calling
the git_odb__read_packed() method; delta'ed objects are also properly
generated when needed.
A new unit test 0204-readpack tries to read a couple hundred packed
objects from a standard packed repository.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
3e590fb2
|
2010-07-07T19:24:08
|
|
Changed test files to use tabs instead of spaces
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
52f2390b
|
2010-07-07T14:56:05
|
|
Add external API to access detailed commit attributes
The following new external methods have been added:
GIT_EXTERN(const char *) git_commit_message_short(git_commit *commit);
GIT_EXTERN(const char *) git_commit_message(git_commit *commit);
GIT_EXTERN(time_t) git_commit_time(git_commit *commit);
GIT_EXTERN(const git_commit_person *) git_commit_committer(git_commit *commit);
GIT_EXTERN(const git_commit_person *) git_commit_author(git_commit *commit);
GIT_EXTERN(const git_tree *) git_commit_tree(git_commit *commit);
A new structure, git_commit_person has been added to represent a
commit's author or committer.
The parsing of a commit has been split in two phases.
When adding a commit to the revision pool:
- the commit's ODB object is opened
- its raw contents are parsed for commit TIME, PARENTS and TREE
(the minimal amount of data required to traverse the pool)
- the commit's ODB object is closed
When querying for extended information on a commit:
- the commit's ODB object is reopened
- its raw contents are parsed for the requested information
- the commit's ODB object remains open to handle additional queries
New unit tests have been added for the new functionality:
In t0401-parse: parse_person_test
In t0402-details: query_details_test
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
b231ef3a
|
2010-06-12T03:08:52
|
|
Add new tests: t0502-table, t0503-tableit
"t0502-table" tests for basic functionality of the objects
table:
table_create (creating a new object table)
table_populate (fill & lookup on the object table)
table_resize (dynamically resize the table)
"t0503-tableit" tests the iterator for object tables:
table_iterator (make sure the iterator reaches all objects)
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
088a731f
|
2010-06-09T14:54:22
|
|
Fixed memory leaks in test suite
Created commit objects in t0401-parse weren't being freed properly.
Updated the API documentation to note that commit objects are owned
by the revision pool and should not be freed manually.
The parents list of each commit was being freed twice after each test.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
ca3939e6
|
2010-06-03T22:28:30
|
|
msvc: Disable a level 4 warning and change -W3 to -W4
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
0aaf8708
|
2010-06-07T19:33:36
|
|
Makefile(s): Add -Wextra to CFLAGS
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
552e23ba
|
2010-06-02T19:16:28
|
|
Fix a bug in the git_oid_to_string() function
When git_oid_to_string() was passed a buffer size larger than
GIT_OID_HEXSZ+1, the function placed the c-string NUL char at
the wrong position. Fix the code to place the NUL at the end
of the (possibly truncated) oid string.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
f2924934
|
2010-06-01T19:41:55
|
|
Style: Do not use (C99) // comments
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
b2bc567f
|
2010-06-01T19:40:58
|
|
Style: Fix brace placement and spacing
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
468b12ad
|
2010-06-01T19:31:26
|
|
msvc: tests/t0403-lists.c: Fix a compiler warning
For more recent versions of msvc, the time_t type, as returned by
the time() function, is a 64-bit type. The srand() function, however,
expects an 'unsigned int' input parameter, leading to the warning.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
0cf02ff9
|
2010-05-26T21:23:01
|
|
Added t0501-walk (simple test for all revision pool walking modes)
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
82b1db3b
|
2010-05-25T22:00:55
|
|
Changed commit time sorting to be descending (from newest to oldest).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
655d381a
|
2010-05-23T16:51:31
|
|
Add topological sorting and new insertion methods for commit lists.
'git_commit_list_toposort()' and 'git_commit_list_timesort()' now
sort a commit list by topological and time order respectively.
Both sorts are stable and in place.
'git_commit_list_append' has been replaced by 'git_commit_list_push_back'
and 'git_commit_list_push_front'.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
d047b47a
|
2010-05-23T04:41:07
|
|
Updated t0401 (commit parsing) to reflect the new API changes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
089c2d93
|
2010-05-23T04:39:33
|
|
Add unit tests for list sorting.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
42281e00
|
2010-05-16T01:52:31
|
|
Add unit tests for Commit parsing
A few initial tests for commit parsing:
"parse_buffer_test" tests git_commit__parse_buffer() with
several malformed commit messages and a few corner cases
which should pass.
"parse_oid_test" tests git_commit__parse_oid() with several
malformed commit lines containing broken SHA1 OIDs.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
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>
|
|
70aab459
|
2010-04-26T22:04:10
|
|
win32: Remove wsock32 from the list of libraries to link
Commit 5dddf7c (Add block-sha1 in favour of the mozilla routines
2010-04-14) introduced the "bswap.h" header file which, for x86
or x86-64 machines, provides a "sane" implementation of ntohl()
and htonl().
The wsock32 library, on the msvc and MinGW build, is only included
in the link to supply the ntohl()/htonl() routines. Since we now
have a built-in implementation, we can remove the wsock32 library
from the link.
[This will break a Windows build on a non-intel machine]
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
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>
|
|
1e5dd572
|
2010-02-12T16:50:33
|
|
Fix some coding style issues
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>
|
|
73dcf287
|
2010-01-12T16:39:25
|
|
msvc: Fix some "unreferenced formal parameter" warnings
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
e8a95256
|
2010-01-04T18:57:13
|
|
msvc: Fix some -W4 warnings
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
1a7bae4d
|
2010-01-11T22:51:42
|
|
Fix some "unused parameter" warnings with -Wextra
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>
|
|
cfe3a027
|
2010-01-15T22:07:44
|
|
Use a 64 bit off_t throughout the library and tests on POSIX
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
|
|
960ca1d7
|
2009-08-28T21:22:46
|
|
Add the git_oid_to_string() utility function
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>
|
|
d2ef83fc
|
2009-08-28T20:22:03
|
|
t0101-oid.c: Fix a memory leak reported by valgrind
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>
|
|
73c4dd92
|
2009-06-15T21:26:02
|
|
Add noreturn declaration compatible with the MSVC compiler.
MSVC provides a compiler declaration to declare that a function
never returns. This declaration is required in front of the
function definition rather than at the end, but fortunately gcc
is compatible with this location as well.
Explicit returns are no longer required after calls to test_die.
Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
c8d42b9b
|
2009-06-04T17:12:00
|
|
t0020-dirent.c: Add explicit returns to the callback functions
In particular, the one_entry() and dont_call_me() callback
functions require explicit returns, in order to suppress
some "control path" compiler warnings (from MS Visual C/C++).
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
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>
|
|
e17a3f56
|
2009-06-04T16:47:59
|
|
Implement git_odb_write()
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
fd0ec033
|
2009-03-23T18:52:00
|
|
Fix comments in renamed t020?-readloose tests
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
498bc090
|
2009-03-23T18:47:18
|
|
t0020-dirent.c: allow test to be run standalone
This test assumed that it was invoked in an empty directory,
which is true when run from the Makefile, and so would fail
if run standalone. In order to allow the test to work when
run from any directory, create a sub directory "dir-walk"
and chdir() into this directory while running the tests.
Also, add some additional tests.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
0f39781c
|
2009-03-12T22:10:32
|
|
Add a test to check existence of loose objects.
Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com>
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>
|