| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
The "oid.h" header is now included instead of "object.h".
The old "revwalk.h" header has been removed; it was empty.
|
| |
|
|
|
|
|
| |
The `reset` call now removes the pushed commits so we can reuse
the revwalker. The API documentation has been updated with the details.
|
|
|
|
| |
That way non-C bindings can use it.
|
|
|
|
|
| |
The commit list was not being properly free'd when a walk was stopped
halfway through.
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
|
|
|
| |
cache
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Lists all the references in a repository. Listing may be filtered by
reference type.
This should applease Lord Clem.
|
|
|
|
|
|
|
|
|
|
| |
The new pack backend is an adaptation of the original git.git code in
`sha1_file.c`. It's slightly faster than the previous version and
severely less memory-hungry.
The call-stack of a normal pack backend query has been properly
documented in the top of the header for future reference. And by
properly I mean with ASCII diagrams 'n shit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Use a new `gitfo_creat_force` that will create the full path to a file
before creating it.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
|
| |
We cannot make sure that the user doesn't use the same buffer as source
and destination, so write to it using memmove.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
| |
|
|
|
|
|
|
| |
Should return `void *` for raw bytes.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
|
| |
We were checking for the index file, which is not assured to exist on
clean git repositories.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
|
|
| |
Disable garbage collection of cross-references to prevent
double-freeing. Internal reference management is now done
with a separate method.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
| |
|
|
|
|
|
|
| |
They are not standard. MSVC complains about them. And that's not good.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
| |
MSVC cannot substract void pointers. Go figure.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
|
| |
- Added several missing reference increases
- Add new destructor to the repository that does not GC the objects
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Renaming a packed reference should not pack another reference
which happens to be in both loose and pack state.
|
|
|
|
|
|
|
| |
Forces a move by creating the folder for the destination file, if it
doesn't exist.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
| |
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|