Commit Graph

15 Commits

Author SHA1 Message Date
Edward Thomson
565fb8dcd4 revwalk: introduce tests that hide old commits
Introduce some tests that show some commits, while hiding some commits
that have a timestamp older than the common ancestors of these two
commits.
2016-10-06 11:04:55 +02:00
Ben Straub
1782038144 Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
Ben Straub
fd29cd13b7 Moved testing resources to clar, and removed old tests directory.
Removed the BUILD_CLAR CMake flag, and updated the readme.
2012-03-31 16:10:01 -07:00
nulltoken
b3f993e287 Add test commit containing subtrees and files 2011-10-13 22:48:58 +02:00
Brodie Rao
04f788023f commit: properly parse empty commit messages
This ensures commit->message is always non-NULL, even if the commit
message is empty or consists of only a newline.

One such commit can be found in the wild in the jQuery repository:

25b424134f
2011-10-12 15:14:25 -07:00
Carlos Martín Nieto
a030ae5020 Add a test for remote parsing
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-06-26 18:18:10 +02:00
Carlos Martín Nieto
3de5df7d8e Add a test for overriding config
The repo's configuration should take precedence over the global one.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Vicent Marti
9d77d83a81 Revert "threads: Fix TLS declarations"
This commit uploaded an old broken test. Oops!
2011-06-07 03:38:09 +02:00
Vicent Marti
64fe8c62f9 threads: Fix TLS declarations
Cleanup the thread-utils file. Do not define TLS if libgit2 is not
threadsafe.
2011-06-07 03:22:32 +02:00
Vicent Marti
b918ae40d1 Do not declare variables in the middle of a func 2011-04-08 15:35:25 -07:00
Vicent Marti
d79f1da65a refs: Fix issue when packing weak tags
Weak tags (e.g. tags that point directly to a normal object instead of a
tag object) were failing to be packed.
2011-04-08 12:14:33 -07:00
nulltoken
f3564e1e29 Fix tag reference name in testrepo.git
The git test repository was holding a wrongly named tag reference ("very-simple") pointing at a tag named "e90810b".
This mistake (mine :-/ ) originates back to https://github.com/libgit2/libgit2/commit/9282e92

Whole credit goes to @tclem for having spotted this.
2011-04-04 13:12:23 +03:00
nulltoken
1af8c7488d Enforced refs handling tests.
- Added a test to ensure that a nested symbolic reference is properly resolved.
 - Added comparisons of object ids.
2011-02-05 15:24:08 +01:00
nulltoken
9282e921a3 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.
2011-01-29 03:39:02 +02:00
Vicent Marti
6fd195d76c 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>
2010-11-02 18:42:42 +02:00