|
511b2370
|
2011-04-04T17:24:37
|
|
tests: update NAMING file
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
f3564e1e
|
2011-04-03T13:50:09
|
|
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.
|
|
3e3e4631
|
2011-04-02T12:49:14
|
|
Merge branch 'tagging' of https://github.com/nulltoken/libgit2 into development
Conflicts:
include/git2/tag.h
src/tag.c
|
|
720d5472
|
2011-04-02T12:42:04
|
|
Change `parse` methods to const buffer
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
9e680bcc
|
2011-03-30T23:26:36
|
|
Add git_tag_delete()
|
|
a50c1458
|
2011-03-30T23:16:30
|
|
Add git_tag_create_o_f() and git_tag_create_f() which overwrite existing tag reference, if any
|
|
74e50a2d
|
2011-03-30T22:46:52
|
|
Fix memory leak in tag releated tests
|
|
bf4c39f9
|
2011-03-30T22:30:55
|
|
Prevent tag_create() from creating a conflicting reference
|
|
6d316014
|
2011-03-30T21:57:20
|
|
Add test demonstrating that one can create a tag pointing at a non existent target
|
|
8e9a3d42
|
2011-03-30T21:46:19
|
|
Enforce the testing of the correct creation of a tag
|
|
673de2cf
|
2011-03-30T21:29:10
|
|
Fix misleading comments
|
|
2b9b99b6
|
2011-03-29T21:29:30
|
|
Add test ensuring one can not create an oid reference which targets at an unknown id
|
|
4d00dfd4
|
2011-03-29T21:21:47
|
|
Replace gitfo_unlink() calls with git_reference_delete() in refs related tests
|
|
553fbd64
|
2011-03-29T11:43:31
|
|
Check for looser reference names
res/dummy/a and refs/stash must pass. The other rules are already
tested by the rest of the checks.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
95cde17c
|
2011-03-29T19:22:21
|
|
Enforce coding conventions in refs.c
Internal methods are static and without the git prefix.
'Force' methods have a `_f` prefix to match the other 'force' methods.
|
|
fc1eeb9d
|
2011-03-29T11:30:09
|
|
Make overwrite test more comprehensive
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
ec991936
|
2011-03-29T10:52:29
|
|
force-rename test: check for the right name
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
591a9423
|
2011-03-28T18:40:58
|
|
Add tests covering overwriting references
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
483526eb
|
2011-03-28T22:23:44
|
|
Update the SQLite backend
|
|
a8375f53
|
2011-03-05T15:09:01
|
|
Add test exercising the opening of an standard repository initialized by git
|
|
2ce44b67
|
2011-03-05T14:33:31
|
|
Add test exercising the opening of an empty bare repository initialized by git
|
|
29e1797c
|
2011-03-05T14:26:22
|
|
Add remove_placeholders() test helper function which recursively removes marker files from a directory structure
|
|
3fe9c60c
|
2011-03-23T00:21:30
|
|
Add empty bare and normal repos to test resources
We have removed the hooks folder because it takes a lot of space
|
|
f428ae61
|
2011-03-19T08:19:34
|
|
Slightly enforce copy_recurs() behavior
The folder creation is now decorrelated from the recursive parsing of the source tree structure.
|
|
ba1bdf86
|
2011-03-18T22:27:15
|
|
Improve test coverage of new path prettifying behavior
|
|
3644e98f
|
2011-03-18T19:10:36
|
|
Fix detection of attempt to escape the root directory on Windows
|
|
677a3c07
|
2011-03-15T22:07:01
|
|
Add failing test for issue 84
see https://github.com/libgit2/libgit2/issues#issue/84
|
|
c90292ce
|
2011-03-18T16:56:43
|
|
Change gitfo_prettify_dir_path() and gitfo_prettify_file_path() behavior
Those functions now return prettified rooted path.
|
|
56d8ca26
|
2011-03-20T18:36:25
|
|
Switch from time_t to git_time_t
git_time_t is defined as a signed 64 integer. This allows a true predictable multiplatform behavior.
|
|
99baacfb
|
2011-03-21T19:27:45
|
|
Fix MSVC warnings
|
|
72a3fe42
|
2011-03-18T19:38:49
|
|
I broke your bindings
Hey. Apologies in advance -- I broke your bindings.
This is a major commit that includes a long-overdue redesign of the
whole object-database structure. This is expected to be the last major
external API redesign of the library until the first non-alpha release.
Please get your bindings up to date with these changes. They will be
included in the next minor release. Sorry again!
Major features include:
- Real caching and refcounting on parsed objects
- Real caching and refcounting on objects read from the ODB
- Streaming writes & reads from the ODB
- Single-method writes for all object types
- The external API is now partially thread-safe
The speed increases are significant in all aspects, specially when
reading an object several times from the ODB (revwalking) and when
writing big objects to the ODB.
Here's a full changelog for the external API:
blob.h
------
- Remove `git_blob_new`
- Remove `git_blob_set_rawcontent`
- Remove `git_blob_set_rawcontent_fromfile`
- Rename `git_blob_writefile` -> `git_blob_create_fromfile`
- Change `git_blob_create_fromfile`:
The `path` argument is now relative to the repository's working dir
- Add `git_blob_create_frombuffer`
commit.h
--------
- Remove `git_commit_new`
- Remove `git_commit_add_parent`
- Remove `git_commit_set_message`
- Remove `git_commit_set_committer`
- Remove `git_commit_set_author`
- Remove `git_commit_set_tree`
- Add `git_commit_create`
- Add `git_commit_create_v`
- Add `git_commit_create_o`
- Add `git_commit_create_ov`
tag.h
-----
- Remove `git_tag_new`
- Remove `git_tag_set_target`
- Remove `git_tag_set_name`
- Remove `git_tag_set_tagger`
- Remove `git_tag_set_message`
- Add `git_tag_create`
- Add `git_tag_create_o`
tree.h
------
- Change `git_tree_entry_2object`:
New signature is `(git_object **object_out, git_repository *repo, git_tree_entry *entry)`
- Remove `git_tree_new`
- Remove `git_tree_add_entry`
- Remove `git_tree_remove_entry_byindex`
- Remove `git_tree_remove_entry_byname`
- Remove `git_tree_clearentries`
- Remove `git_tree_entry_set_id`
- Remove `git_tree_entry_set_name`
- Remove `git_tree_entry_set_attributes`
object.h
------------
- Remove `git_object_new
- Remove `git_object_write`
- Change `git_object_close`:
This method is now *mandatory*. Not closing an object causes a
memory leak.
odb.h
-----
- Remove type `git_rawobj`
- Remove `git_rawobj_close`
- Rename `git_rawobj_hash` -> `git_odb_hash`
- Change `git_odb_hash`:
New signature is `(git_oid *id, const void *data, size_t len, git_otype type)`
- Add type `git_odb_object`
- Add `git_odb_object_close`
- Change `git_odb_read`:
New signature is `(git_odb_object **out, git_odb *db, const git_oid *id)`
- Change `git_odb_read_header`:
New signature is `(size_t *len_p, git_otype *type_p, git_odb *db, const git_oid *id)`
- Remove `git_odb_write`
- Add `git_odb_open_wstream`
- Add `git_odb_open_rstream`
odb_backend.h
-------------
- Change type `git_odb_backend`:
New internal signatures are as follows
int (* read)(void **, size_t *, git_otype *, struct git_odb_backend *, const git_oid *)
int (* read_header)(size_t *, git_otype *, struct git_odb_backend *, const git_oid *)
int (* writestream)(struct git_odb_stream **, struct git_odb_backend *, size_t, git_otype)
int (* readstream)( struct git_odb_stream **, struct git_odb_backend *, const git_oid *)
- Add type `git_odb_stream`
- Add enum `git_odb_streammode`
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
bb3de0c4
|
2011-03-16T21:35:51
|
|
Thread safe cache
|
|
b5c5f0f8
|
2011-03-16T23:59:09
|
|
Fix headers for the new Revision Walker
The "oid.h" header is now included instead of "object.h".
The old "revwalk.h" header has been removed; it was empty.
|
|
36aaf1ff
|
2011-03-16T01:53:25
|
|
Change the Revwalk reset behavior to the old version
The `reset` call now removes the pushed commits so we can reuse
the revwalker. The API documentation has been updated with the details.
|
|
bbcc7ffc
|
2011-03-15T21:04:41
|
|
Add proper threading support to libgit2
We now depend on libpthread on all Unix platforms (should be installed
by default) and use a simple wrapper for Windows threads under Win32.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
b5abb881
|
2011-03-15T19:55:01
|
|
Do not segfault when listing unpacked references
|
|
7ad96e51
|
2011-03-15T05:38:50
|
|
Remove duplicate refs in `git_reference_listall`
|
|
1ee32c6d
|
2011-03-14T00:33:45
|
|
Add test case for issue GH-86
|
|
6b2a1941
|
2011-03-12T23:09:16
|
|
Fix the retarded object interdependency system
It's no longer retarded. All object interdependencies are stored as OIDs
instead of actual objects. This should be hundreds of times faster,
specially on big repositories. Heck, who knows, maye it doesn't even
segfault -- wouldn't that be awesome?
What has changed on the API?
`git_commit_parent`, `git_commit_tree`, `git_tag_target` now return
their values through a pointer-to-pointer, and have an error code.
`git_commit_set_tree` and `git_tag_set_target` now return an error
code and may fail.
`git_repository_free__no_gc` has been deprecated because it's
stupid. Since there are no longer any interdependencies between
objects, we don't need internal reference counting, and GC
never fails or double-free's pointers.
`git_object_close` now does a very sane thing: marks an object
as unused. Closed objects will be eventually free'd from the
object cache based on LRU. Please use `git_object_close` from
the garbage collector `destroy` method on your bindings. It's
100% safe.
`git_repository_gc` is a new method that forces a garbage collector
pass through the repo, to free as many LRU objects as possible.
This is useful if we are running out of memory.
|
|
00571828
|
2011-03-12T16:04:46
|
|
Add new method `git_reference_listall`
Lists all the references in a repository. Listing may be filtered by
reference type.
This should applease Lord Clem.
|
|
71db842f
|
2011-03-08T14:57:03
|
|
Rewrite the Revision Walker
The new revision walker uses an internal Commit object storage system,
custom memory allocator and much improved topological and time sorting
algorithms. It's about 20x times faster than the previous implementation
when browsing big repositories.
The following external API calls have changed:
`git_revwalk_next` returns an OID instead of a full commit object.
The initial call to `git_revwalk_next` is no longer blocking when
iterating through a repo with a time-sorting mode.
Iterating with Topological or inverted modes still makes the initial
call blocking to preprocess the commit list, but this block should be
mostly unnoticeable on most repositories (topological preprocessing
times at 0.3s on the git.git repo).
`git_revwalk_push` and `git_revwalk_hide` now take an OID instead
of a full commit object.
|
|
26022f07
|
2011-03-05T23:54:49
|
|
Add `git_oid_shorten` (unique OID minimzer)
Set of methods to find the minimal-length to uniquely identify every OID
in a list. Useful for GUI applications, commit logs and so on.
Includes stress test.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
45314a7e
|
2011-03-04T23:13:02
|
|
clean up temp repo for t12-repo tests
add actual must_pass calls back into the repo tests and remove ./ from
beginning of temp repo path
|
|
d561403f
|
2011-03-03T19:57:12
|
|
Add test for corner case in reference renaming
|
|
268bee3d
|
2011-03-03T19:54:34
|
|
Add test renameref::rename_a_loose_reference()
|
|
48c27f86
|
2011-02-28T16:51:17
|
|
Implement reference counting for git_objects
All `git_object` instances looked up from the repository are reference
counted. User is expected to use the new `git_object_close` when an
object is no longer needed to force freeing it.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
86d7e1ca
|
2011-02-28T12:46:13
|
|
Fix searching in git_vector
We now store only one sorting callback that does entry comparison. This
is used when sorting the entries using a quicksort, and when looking for
a specific entry with the new search methods.
The following search methods now exist:
git_vector_search(vector, entry)
git_vector_search2(vector, custom_search_callback, key)
git_vector_bsearch(vector, entry)
git_vector_bsearch2(vector, custom_search_callback, key)
The sorting state of the vector is now stored internally.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
5de079b8
|
2011-02-28T12:12:26
|
|
Change the object creation/lookup API
The methods previously known as
git_repository_lookup
git_repository_newobject
git_repository_lookup_ref
are now part of their respective namespaces:
git_object_lookup
git_object_new
git_reference_lookup
This makes the API more consistent with the new references API.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
3dccfed1
|
2011-03-03T18:19:05
|
|
Cleanup the testing toolkit
Tests are now declared with detailed descriptions and a short test name:
BEGIN_TEST(the_test0, "this is an example test that does something")
...
END_TEST
Modules are declared through a simple macro interface:
BEGIN_MODULE(mod_name)
ADD_TEST(the_test0);
...
END_MODULE
Error messages when tests fail have been greatly improved.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
8fc05096
|
2011-03-03T19:59:25
|
|
Add test deleteref::deleting_a_ref_which_is_both_packed_and_loose_should_remove_both_tracks_in_the_filesystem()
|
|
6b02b215
|
2011-03-03T19:43:47
|
|
Add test renameref::can_not_rename_a_reference_with_an_invalid_name()
|
|
65cc1f44
|
2011-03-03T19:42:11
|
|
Add test renameref::can_not_rename_a_reference_with_an_invalid_name()
|
|
de05ff6c
|
2011-03-03T19:40:01
|
|
Add test renameref::renaming_a_packed_reference_makes_it_loose()
|
|
669db21b
|
2011-02-28T22:21:18
|
|
Slightly changed the behavior of git__joinpath() and git__joinpath_n().
|
|
52b2c209
|
2011-03-03T19:37:40
|
|
Enhance the packrefs::create_packfile() test
|
|
e4029c52
|
2011-02-28T12:33:47
|
|
Added copydir_recurs() to test_helpers.c
Test helper function which recursively copies the content of a
directory. This function has been tweaked to prevent stack overflows by
reusing the same path buffers on all recursive calls.
|
|
7167422c
|
2011-02-28T12:16:44
|
|
Refactored some test related constants.
|
|
705a90ec
|
2011-02-26T14:07:13
|
|
Added tests to exercise the initialization and the opening of a repository.
|
|
c38f9013
|
2011-02-26T13:56:57
|
|
Removed a duplicate constant.
|
|
3b3a1017
|
2011-02-25T21:58:25
|
|
Added rmdir_recurs(), a test helper function which recursively removes the content of a directory.
|
|
47d0db78
|
2011-02-25T15:09:31
|
|
Added some dirname and basename tests to ensure that trailing slashes are ignored.
|
|
87d3acf4
|
2011-02-27T22:31:43
|
|
Finish the References API
The following methods have been implemented:
git_reference_packall
git_reference_rename
git_reference_delete
The library now has full support for packed references, including
partial and total writing. Internal documentation has been updated with
the details.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
9b3985fa
|
2011-02-25T10:29:11
|
|
Slightly enhanced the readability of some reference related tests.
|
|
b0a83143
|
2011-02-25T10:06:49
|
|
Removed duplicate tests.
|
|
86194b24
|
2011-02-18T21:57:53
|
|
Split packed from unpacked references
These two reference types are now stored separately to eventually allow
the removal/renaming of loose references and rewriting of the refs
packfile.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2de3b35c
|
2011-02-14T22:32:02
|
|
Added test covering creation of nested symbolic references.
|
|
1d8cc731
|
2011-02-14T22:29:22
|
|
Refactored the reference creation API.
|
|
e1be1028
|
2011-02-13T20:18:35
|
|
Added some more tests to ensure the correct behavior of git_reference__normalize_name().
|
|
77600378
|
2011-02-13T14:51:45
|
|
Fixed line endings (CRLF->LF).
|
|
aa2120e9
|
2011-02-10T15:08:00
|
|
Added git_reference__normalize_name() along with tests.
|
|
fc658755
|
2011-02-22T21:59:36
|
|
Rewrite git_hashtable internals
The old hash table with chained buckets has been replaced by a new one
using Cuckoo hashing, which offers guaranteed constant lookup times.
This should improve speeds on most use cases, since hash tables in
libgit2 are usually used as caches where the objects are stored once and
queried several times.
The Cuckoo hash implementation is based off the one in the Basekit
library [1] for the IO language, but rewritten to support an arbritrary
number of hashes. We currently use 3 to maximize the usage of the nodes pool.
[1]: https://github.com/stevedekorte/basekit/blob/master/source/CHash.c
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
4378e8d4
|
2011-02-22T15:15:35
|
|
Add unit test for writing a big index file
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
348c7335
|
2011-02-17T21:32:00
|
|
Improve the performance when writing Index files
In response to issue #60 (git_index_write really slow), the write_index
function has been rewritten to improve its performance -- it should now
be in par with the performance of git.git.
On top of that, if Posix Threads are available when compiling libgit2, a
new threaded writing system will be used (3 separate threads take care
of solving byte-endianness, hashing the contents of the index and
writing to disk, respectively). For very long Index files, this method
is up to 3x times faster than git.git.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
d4b5a4e2
|
2011-02-09T19:49:02
|
|
Internal changes on the backend system
The priority value for different backends has been removed from the
public `git_odb_backend` struct. We handle that internally. The priority
value is specified on the `git_odb_add_alternate`.
This is convenient because it allows us to poll a backend twice with
different priorities without having to instantiate it twice.
We also differentiate between main backends and alternates; alternates have
lower priority and cannot be written to.
These changes come with some unit tests to make sure that the backend
sorting is consistent.
The libgit2 version has been bumped to 0.4.0.
This commit changes the external API:
CHANGED:
struct git_odb_backend
No longer has a `priority` attribute; priority for the backend
in managed internally by the library.
git_odb_add_backend(git_odb *odb, git_odb_backend *backend, int priority)
Now takes an additional priority parameter, the priority that
will be given to the backend.
ADDED:
git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, int priority)
Add a backend as an alternate. Alternate backends have always
lower priority than main backends, and writing is disabled on
them.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
995f9c34
|
2011-02-09T12:43:19
|
|
Use the new git__joinpath to build paths in methods
The `git__joinpath` function has been changed to use a statically
allocated buffer; we assume the buffer to be 4096 bytes, because fuck
you.
The new method also supports an arbritrary number of paths to join,
which may come in handy in the future.
Some methods which were manually joining paths with `strcpy` now use the
new function, namely those in `index.c` and `refs.c`.
Based on Emeric Fermas' original patch, which was using the old
`git__joinpath` because I'm stupid. Thanks!
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1b7124f8
|
2011-02-07T17:37:54
|
|
Added tests exercising git_reference_write() to create a new symbolic reference and a new object id reference.
|
|
2e75e156
|
2011-02-07T08:04:32
|
|
Merge branch 'refs-handling-tests' of https://github.com/nulltoken/libgit2
|
|
fc8afc87
|
2011-02-06T07:48:17
|
|
Fix a memory leak in git__joinpath() tests.
|
|
a79e8e63
|
2011-02-05T19:22:44
|
|
Fixed a small issue in git__join_path(). Added tests to exercise git__join_path().
|
|
ca0fb40a
|
2011-02-05T17:18:27
|
|
Made test index_write_test() remove the test file it has created.
It can now be run twice in a row without failing.
|
|
c041af95
|
2011-02-05T19:45:57
|
|
Add support for SQLite backends
Configure again the build system to look for SQLite3. If the library is
found, the SQLite backend will be automatically compiled.
Enjoy *very* fast reads and writes.
MASTER PROTIP: Initialize the backend with ":memory" as the path to the
SQLite database for fully-hosted in-memory repositories. Rejoice.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
95901128
|
2011-02-05T18:17:01
|
|
Move data from t03 to a separate header
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1af8c748
|
2011-02-05T15:24:08
|
|
Enforced refs handling tests.
- Added a test to ensure that a nested symbolic reference is properly resolved.
- Added comparisons of object ids.
|
|
f725931b
|
2011-02-05T12:42:41
|
|
Fix directory/path manipulation methods
The `dirname` and `dirbase` methods have been replaced with the Android
implementation, which is actually compilant to some kind of standard.
A new method `topdir` has been added, which returns the topmost
directory in a path.
These changes fix issue #49:
`gitfo_prettify_dir_path` converts "./.git/" to ".git/", so
the code at src/repository.c:190 goes out of bounds when
trying to find the topmost directory.
The new `git__topdir` method handles this gracefully, and the
fixed `git__dirname` now returns the proper value for the
repository's working dir.
E.g.
/repo/.git/ ==> working dir '/repo/'
.git/ ==> working dir '.'
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
c836c332
|
2011-02-05T09:29:37
|
|
Make more methods return error codes
git_revwalk_next now returns an error code when the iteration is over.
git_repository_index now returns an error code when the index file could
not be opened.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
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
|