summaryrefslogtreecommitdiff
path: root/include/git2/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* Extend public filter api with filter listsRussell Belfer2013-09-171-10/+10
| | | | | | | | | | | This moves the git_filter_list into the public API so that users can create, apply, and dispose of filter lists. This allows more granular application of filters to user data outside of libgit2 internals. This also converts all the internal usage of filters to the public APIs along with a few small tweaks to make it easier to use the public git_buffer stuff alongside the internal git_buf.
* Add attributes to filters and fix registryRussell Belfer2013-09-171-18/+83
| | | | | | | | | | | | | | | | | | The filter registry as implemented was too primitive to actually work once multiple filters were coming into play. This expands the implementation of the registry to handle multiple prioritized filters correctly. Additionally, this adds an "attributes" field to a filter that makes it really really easy to implement filters that are based on one or more attribute values. The lookup and even simple value checking can all happen automatically without custom filter code. Lastly, with the registry improvements, this fills out the filter lifecycle callbacks, with initialize and shutdown callbacks that will be called before the filter is first used and after it is last invoked. This allows for system-wide initialization and cleanup by the filter.
* Make git_filter_source opaqueRussell Belfer2013-09-171-6/+23
|
* Create public filter object and use itRussell Belfer2013-09-171-0/+104
| | | | | | | This creates include/sys/filter.h with a basic definition of a git_filter and then converts the internal code to use it. There are related internal objects (git_filter_list) that we will want to publish at some point, but this is a first step.
* odb: Move the auto refresh logic to the pack backendnulltoken2013-09-041-0/+10
| | | | | | | | | | | | Previously, `git_object_read()`, `git_object_read_prefix()` and `git_object_exists()` were implementing an auto refresh logic. When the expected object couldn't be found in any backend, a call to `git_odb_refresh()` was triggered and the lookup was once again performed against all backends. This commit removes this auto-refresh logic from the odb layer and pushes it down into the pack-backend (as it's the only one currently exposing a `refresh()` endpoint).
* Merge pull request #1772 from libgit2/config-iterVicent Martí2013-08-281-2/+28
|\ | | | | Configuration iterators redux
| * config: don't special-case the multivar iteratorCarlos Martín Nieto2013-08-141-2/+0
| | | | | | | | | | Build it on top of the normal iterator instead, which lets use re-use a lot of code.
| * config: working multivar iteratorCarlos Martín Nieto2013-08-081-1/+1
| | | | | | | | Implement the foreach version as a wrapper around the iterator.
| * config: hopefully get the iterator to work on multivarsCarlos Martín Nieto2013-08-081-1/+1
| |
| * config: initial multivar iteratorCarlos Martín Nieto2013-08-081-2/+4
| |
| * config: move next() and free() into the iteratorCarlos Martín Nieto2013-08-081-3/+27
| | | | | | | | | | Like we have in the references iterator, next and free belong in the iterator itself.
| * config: get_multivar -> get_multivar_foreachCarlos Martín Nieto2013-08-081-1/+1
| | | | | | | | | | The plain function will return an iterator, so move this one out of the way.
| * Don't typedef a pointerCarlos Martín Nieto2013-08-081-1/+1
| | | | | | | | Make the iterator structure opaque and make sure it compiles.
| * replaced foreach() with non callback based iterations in git_config_backendNico von Geyso2013-08-081-1/+3
| | | | | | | | | | | | | | | | | | new functions in struct git_config_backend: * iterator_new(...) * iterator_free(...) * next(...) The old callback based foreach style can still be used with `git_config_backend_foreach_match`
* | odb: document git_odb_streamCarlos Martín Nieto2013-08-171-0/+4
| | | | | | | | | | | | Clarify the role of each function and in particular mention that there is no need for the backend or stream to worry about the object's id, as it will be given when `finalize_write` is called.
* | odb: make it clearer that the id is calculated in the frontendCarlos Martín Nieto2013-08-171-5/+1
|/ | | | | | | | | | The frontend is in charge of calculating the id of the objects. Thus the backends should treat it as a read-only value. The positioning in the function signature made it seem as though it was an output parameter. Make the id const and move it from the front to behind the subject (backend or stream).
* Clean up some documentationCarlos Martín Nieto2013-07-232-4/+2
| | | | clang's docparser highlighted these.
* ...Aaaand this worksVicent Marti2013-05-301-2/+7
|
* What are the chances, reallyVicent Marti2013-05-291-28/+21
|
* Liike thisVicent Marti2013-05-281-1/+1
|
* Typedef git_config_level_t and use it everywhereRussell Belfer2013-05-241-2/+2
| | | | | | | | The GIT_CONFIG_LEVEL constants actually work well as an enum because they are mutually exclusive, so this adds a typedef to the enum and uses that everywhere that one of these constants are expected, instead of the old code that typically used an unsigned int.
* Fix trailing whitespacesnulltoken2013-05-151-1/+0
|
* Unify whitespaces to tabsLinquize2013-05-151-1/+1
|
* Merge pull request #1385 from carlosmn/refs-iterEdward Thomson2013-05-111-17/+47
|\ | | | | Introduce a refs iterator
| * Introduce a glob-filtering iteratorCarlos Martín Nieto2013-05-111-1/+13
| | | | | | | | | | If the backend doesn't provide support for it, the matching is done in refdb on top of a normal iterator.
| * refs: remove the OID/SYMBOLIC filteringCarlos Martín Nieto2013-05-111-24/+7
| | | | | | | | | | | | | | | | | | Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
| * refs: introduce an iteratorCarlos Martín Nieto2013-05-111-0/+35
| | | | | | | | This allows us to get a list of reference names in a loop instead of callbacks.
* | commit: make create_from_oids() accept plain oidnulltoken2013-05-051-2/+3
|/
* move NAME and REUC extensions to sys/Edward Thomson2013-04-301-0/+180
|
* repo: Add `git_repository__cleanup`Vicent Marti2013-04-241-0/+14
|
* Move git_reference__alloc to include/git2/sysRussell Belfer2013-04-212-13/+61
| | | | | | Create a new include/git2/sys/refs.h and move the reference alloc functions there. Also fix some documentation issues and some minor code cleanups.
* Move refdb_backend to include/git2/sysRussell Belfer2013-04-211-0/+120
| | | | | | | | | This moves most of the refdb stuff over to the include/git2/sys directory, with some minor shifts in function organization. While I was making the necessary updates, I also removed the trailing whitespace in a few files that I modified just because I was there and it was bugging me.
* Move git_commit_create_from_oids into sys/commit.hRussell Belfer2013-04-211-0/+45
| | | | | | | | Actually this renames git_commit_create_oid to git_commit_create_from_oids and moves the API declaration to include/git2/sys/commit.h since it is a dangerous API for general use (because it doesn't check that the OID list items actually refer to real objects).
* Move some low-level repo fns to include/git2/sysRussell Belfer2013-04-211-0/+92
|
* Move odb_backend implementors stuff into git2/sysRussell Belfer2013-04-212-2/+89
| | | | | | | | | | | | This moves some of the odb_backend stuff that is related to the internals of an odb_backend implementation into include/git2/sys. Some of the stuff related to streaming I left in include/git2 because it seemed like it would be reasonably needed by a normal user who wanted to stream objects into and out of the ODB. Also, I added APIs for traversing the list of backends so that some of the tests would not need to access ODB internals.
* Move git_config_backend to include/git2/sysRussell Belfer2013-04-211-0/+70
Moving backend implementor objects into include/git2/sys so the APIs can be isolated from the ones that normal libgit2 users would be likely to use.