summaryrefslogtreecommitdiff
path: root/include/git2/sys
Commit message (Collapse)AuthorAgeFilesLines
* Make enum in includes C90 compliant by removing trailing comma.Peter Pettersson2021-11-153-4/+4
|
* Update documentation for ODB backend refresh logicJosh Triplett2021-11-081-5/+2
| | | | | | | Commit b1a6c316a6070fac4ab1ec5792979838f7145c39 moved auto-refresh into the pack backend, and added a comment accordingly. Commit 43820f204ea32503b4083e3b6b83f30a0a0031c9 moved auto-refresh back *out* of backends into the ODB layer, but didn't update the comment.
* email: introduce `git_email_create_from_diff`Edward Thomson2021-09-181-0/+45
| | | | | | | | | Introduce a function to create an email from a diff and multiple inputs about the source of the diff. Creating an email from a diff requires many more inputs, and should be discouraged in favor of building directly from a commit, and is thus in the `sys` namespace.
* Merge branch 'cgraph-write' into mainEdward Thomson2021-08-301-1/+130
|\
| * commit graph: formatting fixesEdward Thomson2021-08-301-3/+2
| |
| * Merge remote-tracking branch 'origin/main' into cgraph-writelhchavez2021-08-292-0/+81
| |\
| * | Make the defaultable fields defaultablelhchavez2021-08-261-2/+2
| | | | | | | | | | | | Also, add `git_commit_graph_writer_options_init`!
| * | commit-graph: Add a way to write commit-graph fileslhchavez2021-07-271-1/+131
| | | | | | | | | | | | | | | | | | | | | | | | This change adds the git_commit_graph_writer_* functions to allow to write and create `commit-graph` files from `.idx`/`.pack` files or `git_revwalk`s. Part of: #5757
* | | Merge pull request #6011 from libgit2/ethomson/filter_applyEdward Thomson2021-08-291-28/+49
|\ \ \ | |_|/ |/| | filter: filter drivers stop taking git_buf as user input
| * | filter: deprecate apply functionethomson/filter_applyEdward Thomson2021-08-291-0/+8
| | |
| * | filter: add docs for `git_filter_stream_fn`Edward Thomson2021-08-271-28/+41
| |/
* | midx: Introduce git_odb_write_multi_pack_index()lhchavez2021-08-271-0/+7
| | | | | | | | | | | | | | | | This change introduces git_odb_write_multi_pack_index(), which creates a `multi-pack-index` file from all the `.pack` files that have been loaded in the ODB. Fixes: #5399
* | midx: Add a way to write multi-pack-index fileslhchavez2021-08-271-0/+74
|/ | | | | | | This change adds the git_midx_writer_* functions to allow to write and create `multi-pack-index` files from `.idx`/`.pack` files. Part of: #5399
* Merge pull request #5765 from lhchavez/cgraph-revwalksEdward Thomson2021-07-261-0/+45
|\ | | | | commit-graph: Use the commit-graph in revwalks
| * commit-graph: Create `git_commit_graph` as an abstraction for the filelhchavez2021-03-101-0/+45
| | | | | | | | | | | | | | | | | | | | This change does a medium-size refactor of the git_commit_graph_file and the interaction with the ODB. Now instead of the ODB owning a direct reference to the git_commit_graph_file, there will be an intermediate git_commit_graph. The main advantage of that is that now end users can explicitly set a git_commit_graph that is eagerly checked for errors, while still being able to lazily use the commit-graph in a regular ODB, if the file is present.
* | docs: fix some missing includes that cause Docurium to error outEtienne Samson2021-05-271-0/+1
|/
* refdb_backend: improve callback documentationPatrick Steinhardt2020-03-261-2/+109
| | | | | | | The callbacks are currently sparsely documented, making it really hard to implement a new backend without taking a look at the existing refdb_fs backend. Add documentation to make this task hopefully easier to achieve.
* Merge pull request #5336 from libgit2/ethomson/credtypePatrick Steinhardt2020-01-303-81/+96
|\ | | | | cred: change enum to git_credential_t and GIT_CREDENTIAL_*
| * credential: change git_cred to git_credentialethomson/credtypeEdward Thomson2020-01-263-81/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We avoid abbreviations where possible; rename git_cred to git_credential. In addition, we have standardized on a trailing `_t` for enum types, instead of using "type" in the name. So `git_credtype_t` has become `git_credential_t` and its members have become `GIT_CREDENTIAL` instead of `GIT_CREDTYPE`. Finally, the source and header files have been renamed to `credential` instead of `cred`. Keep previous name and values as deprecated, and include the new header files from the previous ones.
* | mempack functions: return an intEdward Thomson2020-01-241-1/+2
| | | | | | | | | | Stop returning a void for functions, future-proofing them to allow them to fail.
* | repository functions: return an intEdward Thomson2020-01-241-5/+12
| | | | | | | | | | Stop returning a void for functions, future-proofing them to allow them to fail.
* | index functions: return an intEdward Thomson2020-01-241-2/+4
|/ | | | | Stop returning a void for functions, future-proofing them to allow them to fail.
* merge: Return non-const git_repository from git_merge_driver_source_repo ↵Laurence McGlashan2020-01-151-1/+1
| | | | accessor.
* odb: use `git_object_size_t` for object sizeEdward Thomson2019-11-221-1/+1
| | | | | Instead of using a signed type (`off_t`) use a new `git_object_size_t` for the sizes of objects.
* Merge pull request #5106 from tiennou/fix/ref-api-fixesPatrick Steinhardt2019-09-271-21/+57
|\ | | | | git_refdb API fixes
| * refdb: documentationEtienne Samson2019-09-051-21/+57
| |
* | cred: separate public interface from low-level detailsEtienne Samson2019-09-131-0/+90
|/
* Merge pull request #5128 from tiennou/fix/docsPatrick Steinhardt2019-06-271-9/+9
|\ | | | | More documentation
| * docs: More of itEtienne Samson2019-06-261-9/+9
| |
* | repo: commondir resolution can sometimes fallback to the repodirEtienne Samson2019-06-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | For example, https://git-scm.com/docs/gitrepository-layout says: info Additional information about the repository is recorded in this directory. This directory is ignored if $GIT_COMMON_DIR is set and "$GIT_COMMON_DIR/info" will be used instead. So when looking for `info/attributes`, we need to check the commondir first, or fallback to "our" `info/attributes`.
* | docs: fixupsEtienne Samson2019-06-261-1/+1
|/
* odb: provide a free function for custom backendsethomson/odb_backend_allocationsEdward Thomson2019-02-231-0/+11
| | | | | | | | | | | | Custom backends can allocate memory when reading objects and providing them to libgit2. However, if an error occurs in the custom backend after the memory has been allocated for the custom object but before it's returned to libgit2, the custom backend has no way to free that memory and it must be leaked. Provide a free function that corresponds to the alloc function so that custom backends have an opportunity to free memory before they return an error.
* odb: rename git_odb_backend_malloc for consistencyEdward Thomson2019-02-231-2/+35
| | | | | | | | | | | | The `git_odb_backend_malloc` name is a system function that is provided for custom ODB backends and allows them to allocate memory for an ODB object in the read callback. This is important so that libgit2 can later free the memory used by an ODB object that was read from the custom backend. However, the name _suggests_ that it actually allocates a `git_odb_backend`. It does not; rename it to make it clear that it actually allocates backend _data_.
* indexer: use git_indexer_progress throughoutEdward Thomson2019-02-222-3/+3
| | | | | Update internal usage of `git_transfer_progress` to `git_indexer_progreses`.
* Remove `git_time_monotonic`remove_time_monotonicEdward Thomson2019-02-171-31/+0
| | | | | | | | | | `git_time_monotonic` was added so that non-native bindings like rugged could get high-resolution timing for benchmarking. However, this is outside the scope of libgit2 *and* rugged decided not to use this function in the first place. Google suggests that absolutely _nobody_ is using this function and we don't want to be in the benchmarking business. Remove the function.
* docs: minor changesEtienne Samson2019-01-301-12/+21
|
* transport: enhance documentationEtienne Samson2019-01-281-57/+88
|
* deprecation: deprecated stream registration in if guardEdward Thomson2019-01-251-6/+15
| | | | | | | | `git_stream_register_tls` is now deprecated; mark it in an if guard with the deprecation. This should not be included in `deprecated.h` since it is an uncommonly used `sys` header file.
* Introduce GIT_CALLBACK macro to enforce cdeclEdward Thomson2019-01-179-93/+93
| | | | | | | | | Since we now always build the library with cdecl calling conventions, our callbacks should be decorated as such so that users will not be able to provide callbacks defined with other calling conventions. The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as appropriate.
* object_type: update public API to use git_object_tEdward Thomson2018-12-011-6/+6
| | | | | | git_object_t is the future; update the public API to use it. This will also ensure that we can build our tests which make use of the old API without modification (and without compiler warnings).
* stream registration: take an enum typeEdward Thomson2018-11-281-3/+15
| | | | | | Accept an enum (`git_stream_t`) during custom stream registration that indicates whether the registration structure should be used for standard (non-TLS) streams or TLS streams.
* stream: provide generic registration APIEdward Thomson2018-11-281-9/+38
| | | | | | | | | Update the new stream registration API to be `git_stream_register` which takes a registration structure and a TLS boolean. This allows callers to register non-TLS streams as well as TLS streams. Provide `git_stream_register_tls` that takes just the init callback for backward compatibliity.
* tls: introduce a wrap functionEdward Thomson2018-11-281-6/+36
| | | | | | | | | | | Introduce `git_tls_stream_wrap` which will take an existing `stream` with an already connected socket and begin speaking TLS on top of it. This is useful if you've built a connection to a proxy server and you wish to begin CONNECT over it to tunnel a TLS connection. Also update the pluggable TLS stream layer so that it can accept a registration structure that provides an `init` and `wrap` function, instead of a single initialization function.
* transport: see if cert/cred callbacks exist before calling themEdward Thomson2018-11-151-2/+8
| | | | | | | Custom transports may want to ask libgit2 to invoke a configured credential or certificate callback; however they likely do not know if a callback was actually configured. Return a sentinal value (GIT_PASSTHROUGH) if there is no callback configured instead of crashing.
* path: export the dotgit-checking functionscmn/expose-gitfile-checkCarlos Martín Nieto2018-10-151-0/+64
| | | | | | | | These checks are preformed by libgit2 on checkout, but they're also useful for performing checks in applications which do not involve checkout. Expose them under `sys/` as it's still fairly in the weeds even for this library.
* settings: allow swapping out memory allocatorPatrick Steinhardt2018-06-071-0/+24
| | | | | | | Tie in the newly created infrastructure for swapping out memory allocators into our settings code. A user can now simply use the new option "GIT_OPT_SET_ALLOCATOR" with `git_libgit2_opts`, passing in an already initialized allocator structure as vararg.
* alloc: make memory allocators use function pointersPatrick Steinhardt2018-06-071-0/+77
| | | | | | | | | | | | | | | | | Currently, our memory allocators are being redirected to the correct implementation at compile time by simply using macros. In order to make them swappable at runtime, this commit reshuffles that by instead making use of a global "git_allocator" structure, whose pointers are set up to reference the allocator functions. Like this, it becomes easy to swap out allocators by simply setting these function pointers. In order to initialize a "git_allocator", our provided allocators "stdalloc" and "crtdbg" both provide an init function. This is being called to initialize a passed in allocator struct and set up its members correctly. No support is yet included to enable users of libgit2 to switch out the memory allocator at a global level.
* docs: correct defgroupEtienne Samson2018-05-071-1/+1
|
* docs: fix incorrect codeblock on outputEtienne Samson2018-05-071-35/+35
|
* docs: fix more missing includesEtienne Samson2018-05-072-0/+8
|