summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | indexer: use a byte array for checksumEdward Thomson2022-01-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_indexer_hash` function. Callers should use the new `git_indexer_name` function which provides a unique packfile name.
| * | | index: use a byte array for checksumEdward Thomson2022-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_index_checksum` function without a replacement. This is an abstraction that callers should not care about (and indeed do not seem to be using). Remove the unused `git_index__changed_relative_to` function.
* | | | merge: support zdiff3 conflict stylesEdward Thomson2022-01-302-2/+8
|/ / /
* | | Merge pull request #6168 from punkymaniac/patch-documentation-2Edward Thomson2022-01-1732-9/+144
|\ \ \ | | | | | | | | Improve documentation
| * | | Apply suggestions from code reviewEdward Thomson2022-01-1710-14/+13
| | | |
| * | | Set parameter name as function declarationpunkymaniac2022-01-122-2/+2
| | | |
| * | | Separate function description from short descriptionpunkymaniac2022-01-111-6/+7
| | | |
| * | | Rephrase param descriptionpunkymaniac2022-01-091-1/+1
| | | |
| * | | Fix misspelling word "ge" -> "get"punkymaniac2022-01-091-1/+1
| | | |
| * | | Document return value for git_libgit2_featurespunkymaniac2022-01-091-0/+3
| | | |
| * | | Add documentation about parameter and return valuepunkymaniac2022-01-0930-0/+122
| | | |
| * | | Add missing parameter namepunkymaniac2022-01-091-1/+1
| | | |
| * | | Add `git_apply_options_init` documentationpunkymaniac2022-01-091-0/+10
| | | |
* | | | Merge branch 'main' into typosEdward Thomson2022-01-173-66/+197
|\ \ \ \
| * | | | remote: introduce `follow_redirects` connect optionEdward Thomson2022-01-131-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give callers the ability to select how to handle redirects - either supporting redirects during the initial connection (so that, for example, `git.example.com/repo` can redirect to `github.com/example/repo`) or all/no redirects. This is for compatibility with git.
| * | | | remote: introduce `git_remote_connect_options`ethomson/remote_connect_optsEdward Thomson2022-01-062-66/+146
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing mechanism for providing options to remote fetch/push calls, and subsequently to transports, is unsatisfactory. It requires an options structure to avoid breaking the API and callback signatures. 1. Introduce `git_remote_connect_options` to satisfy those needs. 2. Add a new remote connection API, `git_remote_connect_ext` that will take this new options structure. Existing `git_remote_connect` calls will proxy to that. `git_remote_fetch` and `git_remote_push` will proxy their fetch/push options to that as well. 3. Define the interaction between `git_remote_connect` and fetch/push. Connect _may_ be called before fetch/push, but _need not_ be. The semantics of which options would be used for these operations was not specified if you specify options for both connect _and_ fetch. Now these are defined that the fetch or push options will be used _if_ they were specified. Otherwise, the connect options will be used if they were specified. Otherwise, the library's defaults will be used. 4. Update the transports to understand `git_remote_connect_options`. This is a breaking change to the systems API.
| * | | Add `rename_threshold` to `git_status_options`.Miguel Arroz2021-12-311-0/+6
| | | |
* | | | Fix typosDimitris Apostolou2022-01-0513-19/+19
|/ / /
* | | worktree: checkout options suggestions from code reviewEdward Thomson2021-12-231-1/+1
| | |
* | | Allow user checkout options on git_worktree_addpunkymaniac2021-12-231-1/+6
| | | | | | | | | | | | | | | | | | Extend the `git_worktree_add_options` to include `git_checkout_options`. github issue #5949
* | | blob: identify binary contentethomson/blob_data_is_binaryEdward Thomson2021-12-101-0/+12
| | | | | | | | | | | | | | | Introduce `git_blob_data_is_binary` to examine a blob's data, instead of the blob itself. A replacement for `git_buf_is_binary`.
* | | object: introduce a raw content validation functionethomson/object_validationEdward Thomson2021-11-301-0/+22
| | | | | | | | | | | | | | | Users may want to validate raw object content; provide them a function to do so.
* | | object: return GIT_EINVALID on parse errorsEdward Thomson2021-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return `GIT_EINVALID` on parse errors so that direct callers of parse functions can determine when there was a failure to parse the object. The object parser functions will swallow this error code to prevent it from propagating down the chain to end-users. (`git_merge` should not return `GIT_EINVALID` when a commit it tries to look up is not valid, this would be too vague to be useful.) The only public function that this affects is `git_signature_from_buffer`, which is now documented as returning `GIT_EINVALID` when appropriate.
* | | Make enum in includes C90 compliant by removing trailing comma.Peter Pettersson2021-11-1538-72/+72
| | |
* | | Omit trailing comma on enum Josh Triplett2021-11-081-1/+1
| | | | | | | | | | | | | | | To accommodate less capable compilers. Co-authored-by: Peter Pettersson <85582231+boretrk@users.noreply.github.com>
* | | Support checking for object existence without refreshJosh Triplett2021-11-081-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looking up a non-existent object currently always invokes `git_odb_refresh`. If looking up a large batch of objects, many of which may legitimately not exist, this will repeatedly refresh the ODB to no avail. Add a `git_odb_exists_ext` that accepts flags controlling the ODB lookup, and add a flag to suppress the refresh. This allows the user to control if and when they refresh (for instance, refreshing once before starting the batch).
* | | 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.
* | | str: introduce `git_str` for internal, `git_buf` is externalethomson/gitstrEdward Thomson2021-10-171-78/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libgit2 has two distinct requirements that were previously solved by `git_buf`. We require: 1. A general purpose string class that provides a number of utility APIs for manipulating data (eg, concatenating, truncating, etc). 2. A structure that we can use to return strings to callers that they can take ownership of. By using a single class (`git_buf`) for both of these purposes, we have confused the API to the point that refactorings are difficult and reasoning about correctness is also difficult. Move the utility class `git_buf` to be called `git_str`: this represents its general purpose, as an internal string buffer class. The name also is an homage to Junio Hamano ("gitstr"). The public API remains `git_buf`, and has a much smaller footprint. It is generally only used as an "out" param with strict requirements that follow the documentation. (Exceptions exist for some legacy APIs to avoid breaking callers unnecessarily.) Utility functions exist to convert a user-specified `git_buf` to a `git_str` so that we can call internal functions, then converting it back again.
* | | diff: document updated rename limitethomson/diff_rename_limitEdward Thomson2021-10-131-1/+1
| |/ |/|
* | Merge pull request #6076 from libgit2/ethomson/oidarray_disposeEdward Thomson2021-09-272-8/+29
|\ \ | | | | | | oidarray: introduce `git_oidarray_dispose`
| * | oidarray: introduce `git_oidarray_dispose`ethomson/oidarray_disposeEdward Thomson2021-09-262-8/+29
| | | | | | | | | | | | | | | | | | Since users are disposing the _contents_ of the oidarray, not freeing the oidarray itself, the proper cleanup function is `git_oidarray_dispose`. Deprecate `git_oidarray_free`.
* | | repository: improve `hashfile` for absolute pathsEdward Thomson2021-09-251-5/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | When `git_repository_hashfile` is handed an absolute path, it determines whether the path is within the repository's working directory or not. This is necessary when there is no `as_path` specified. If the path is within the working directory, then the given path should be used for attribute lookups (it is the effective `as_path`). If it is not within the working directory, then it is _not_ eligible. Importantly, now we will _never_ pass an absolute path down to attribute lookup functions.
* | v1.3: update version numberethomson/v1_3Edward Thomson2021-09-221-3/+3
| |
* | Merge pull request #6068 from libgit2/ethomson/diff_enumEdward Thomson2021-09-221-4/+3
|\ \ | | | | | | diff: update `GIT_DIFF_IGNORE_BLANK_LINES`
| * | diff: update `GIT_DIFF_IGNORE_BLANK_LINES`ethomson/diff_enumEdward Thomson2021-09-211-4/+3
| | | | | | | | | | | | | | | `GIT_DIFF_IGNORE_BLANK_LINES` needs to be within a (signed) int, per the `enum` definition of ISO C.
* | | filter: use a `git_oid` in filter options, not a pointerethomson/filter_commit_idEdward Thomson2021-09-213-3/+21
|/ / | | | | | | | | | | | | Using a `git_oid *` in filter options was a mistake; it is a deviation from our typical pattern, and callers in some languages that GC may need very special treatment in order to pass both an options structure and a pointer outside of it.
* | Merge pull request #6061 from libgit2/ethomson/emailEdward Thomson2021-09-204-93/+268
|\ \ | | | | | | Introduce `git_email_create`; deprecate `git_diff_format_email`
| * | diff: deprecate diff_format_emailethomson/emailEdward Thomson2021-09-182-93/+96
| | | | | | | | | | | | `git_diff_format_email` is deprecated in favor of `git_email_create`.
| * | email: include renames by defaultEdward Thomson2021-09-181-2/+10
| | | | | | | | | | | | | | | `git format-patch` includes diffs with rename detection enabled by default when creating emails. Match this behavior.
| * | email: include binary diffs by defaultEdward Thomson2021-09-181-5/+9
| | | | | | | | | | | | | | | `git format-patch` includes binary diffs by default when creating emails. Match this behavior.
| * | email: introduce `git_email_create_from_diff`Edward Thomson2021-09-182-13/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | email: introduce `git_email_create_from_commit`Edward Thomson2021-09-181-0/+106
| | | | | | | | | | | | | | | | | | Create `git_email_*` which will encapsulate email creation and application, and `git_email_create_from_commit` in particular, which creates an email for a single commit.
* | | Merge pull request #6020 from ↵Edward Thomson2021-09-201-3/+3
|\ \ \ | |/ / |/| | | | | | | | lolgear/refactoring/stdint_ifdef_condition_has_been_reverted Stdint header condition has been reverted.
| * | include: stdint header condition has been reverted.Dmitry Lobanov2021-08-301-3/+3
| | |
* | | Merge pull request #6031 from libgit2/ethomson/extensionsEdward Thomson2021-09-141-1/+19
|\ \ \ | | | | | | | | Support custom git extensions
| * | | common: support custom repository extensionsethomson/extensionsEdward Thomson2021-09-041-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow users to specify additional repository extensions that they want to support. For example, callers can specify that they support `preciousObjects` and then may open repositories that support `extensions.preciousObjects`. Similarly, callers may opt out of supporting extensions that the library itself supports.
* | | | Fix coding style for pointerpunkymaniac2021-09-095-12/+12
| | | | | | | | | | | | | | | | Make some syntax change to follow coding style.
* | | | remote: Mark `git_remote_name_is_valid` as `GIT_EXTERN`lhchavez2021-09-041-1/+1
|/ / / | | | | | | | | | | | | | | | | | | This change makes `git_remote_name_is_valid` be part of the public interface of the library. This is needed for other language bindings to be able to find this symbol (like in git2go, when linking against libgit2 dynamically).
* | | v1.2: update version informationEdward Thomson2021-08-311-3/+3
| | |
* | | Merge branch 'cgraph-write' into mainEdward Thomson2021-08-302-1/+133
|\ \ \ | |/ / |/| |