include


Log

Author Commit Date CI Message
Edward Thomson cd350852 2019-01-17T10:40:13 object_type: GIT_OBJECT_BAD is now GIT_OBJECT_INVALID We use the term "invalid" to refer to bad or malformed data, eg `GIT_REF_INVALID` and `GIT_EINVALIDSPEC`. Since we're changing the names of the `git_object_t`s in this release, update it to be `GIT_OBJECT_INVALID` instead of `BAD`.
Edward Thomson 90046899 2019-01-17T10:42:51 object_type: mark old values as deprecated Mark old object type values as `static const` so that we can mark them as deprecated with the `GIT_DEPRECATED` macro.
Carlos Martín Nieto 5bd78c48 2018-12-14T14:41:17 refs: constify git_reference_peel We have no need to take a non-const reference. This does involve some other work to make sure we don't mix const and non-const variables, but by splitting what we want each variable to do we can also simplify the logic for when we do want to free a new reference we might have allocated.
Edward Thomson 19faf7c5 2018-11-14T23:35:48 object_type: update public API to use git_object_t 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).
Edward Thomson 26b21b39 2018-11-14T22:48:10 object_type: remove unused object type flags The two "reserved" bits in `git_object_t` are unused. They were included for completeness, but downstream users should never use them and they should not have been made public. These values are never set. With the refactoring of `git_otype` into `git_object_t`, we can remove these from the new API. They will remain in the old (deprecated) API in the unlikely event that someone was using them.
Edward Thomson 7e7859a1 2018-11-14T21:12:55 object_type: update enumeration names Update the `git_otype` names to reflect our current naming conventions. `git_otype` is now `git_object_t` and the `GIT_OBJ_*` values are now `GIT_OBJECT_*` values. The old macro, enumeration and structure names are retained and simply set to the new names.
Edward Thomson 4e892ae5 2018-11-14T21:00:25 index: update enum and structure names We have various macro, enumeration and structure names that were introduced (very) early in the project and do not match our current naming conventions. For instance: `GIT_IDXENTRY...` flags that correspond to a structure named `git_index_entry`. Update these to match the current guidance. The old macros and enumeration names are reflected as new macros in order to support backward compatibility (and do so without warnings for consumers).
Patrick Steinhardt 0ddc6094 2018-11-30T09:46:14 Merge pull request #4770 from tiennou/feature/merge-analysis-any-branch Allow merge analysis against any reference
Patrick Steinhardt e7873eb2 2018-11-29T08:00:31 Merge pull request #4888 from TheBB/add-cb revwalk: Allow changing hide_cb
Edward Thomson 02bb39f4 2018-11-22T08:49:09 stream registration: take an enum type 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.
Edward Thomson df2cc108 2018-11-18T10:29:07 stream: provide generic registration API 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.
Edward Thomson 43b592ac 2018-10-25T08:49:01 tls: introduce a wrap function 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.
Eivind Fonn 0836f069 2018-11-14T16:08:30 revwalk: Allow changing hide_cb Since git_revwalk objects are encouraged to be reused, a public interface for changing hide_cb is desirable.
Patrick Steinhardt c97d302d 2018-11-28T13:45:41 Merge pull request #4879 from libgit2/ethomson/defer_cert_cred_cb Allow certificate and credential callbacks to decline to act
Edward Thomson a2e6e0ea 2018-11-06T14:15:43 transport: allow cred/cert callbacks to return GIT_PASSTHROUGH Allow credential and certificate checking callbacks to return GIT_PASSTHROUGH, indicating that they do not want to act. Introduce this to support in both the http and ssh callbacks. Additionally, enable the same mechanism for certificate validation. This is most useful to disambiguate any meaning in the publicly exposed credential and certificate functions (`git_transport_smart_credentials` and `git_transport_smart_certificate_check`) but it may be more generally useful for callers to be able to defer back to libgit2.
Patrick Steinhardt 0e3e832d 2018-11-21T13:30:01 Merge pull request #4884 from libgit2/ethomson/index_iterator index: introduce git_index_iterator
Ozan Sener 4dcd4514 2018-11-18T18:13:58 worktree: Expose git_worktree_add_init_options
Edward Thomson 8ee10098 2018-11-06T13:10:30 transport: see if cert/cred callbacks exist before calling them 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.
Edward Thomson c358bbc5 2018-11-12T17:22:47 index: introduce git_index_iterator Provide a public git_index_iterator API that is backed by an index snapshot. This allows consumers to provide a stable iteration even while manipulating the index during iteration.
Patrick Steinhardt 20cb30b6 2018-11-13T13:40:17 Merge pull request #4667 from tiennou/feature/remote-create-api Remote creation API
Edward Thomson 47cc5f85 2018-09-29T19:32:51 apply: introduce a hunk callback Introduce a callback to patch application that allows consumers to cancel hunk application.
Edward Thomson af33210b 2018-07-10T16:10:03 apply: introduce a delta callback Introduce a callback to the application options that allow callers to add a per-delta callback. The callback can return an error code to stop patch application, or can return a value to skip the application of a particular delta.
Edward Thomson 37b25ac5 2018-07-08T16:12:58 apply: move location to an argument, not the opts Move the location option to an argument, out of the options structure. This allows the options structure to be re-used for functions that don't need to know the location, since it's implicit in their functionality. For example, `git_apply_tree` should not take a location, but is expected to take all the other options.
Edward Thomson c3077ea0 2018-06-25T21:24:49 apply: return a specific exit code on failure Return `GIT_EAPPLYFAIL` on patch application failure so that users can determine that patch application failed due to a malformed/conflicting patch by looking at the error code.
Edward Thomson f83bbe0a 2018-03-19T19:50:45 apply: introduce `git_apply` Introduce `git_apply`, which will take a `git_diff` and apply it to the working directory (akin to `git apply`), the index (akin to `git apply --cached`), or both (akin to `git apply --index`).
Edward Thomson 02b1083a 2018-01-28T23:25:07 apply: introduce `git_apply_tree` Introduce `git_apply_tree`, which will apply a `git_diff` to a given `git_tree`, allowing an in-memory patch application for a repository.
Etienne Samson d3650294 2018-06-20T02:27:14 remote: add a flag to prevent generation of the default fetchspec
Etienne Samson fdb116b3 2018-06-20T02:27:12 remote: add a creation flag for ignoring url.insteadOf
Etienne Samson 3cbaebdf 2018-06-20T02:27:11 remote: provide a generic API for creating remotes This supersedes the functionality of remote_create_with_fetchspec, remote_create_anonymous and remote_create_detached.
Edward Thomson 305e801a 2018-10-21T09:52:32 util: allow callers to reset custom allocators Provide a utility to reset custom allocators back to their default. This is particularly useful for testing.
Etienne Samson 6e9fb040 2018-08-25T01:47:39 merge: make analysis possible against a non-HEAD reference This moves the current merge analysis code into a more generic version that can work against any reference. Also change the tests to check returned analysis values exactly.
Carlos Martín Nieto 05e54e00 2018-10-15T13:54:17 path: export the dotgit-checking functions 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.
Etienne Samson 25da1acb 2018-09-25T14:43:19 config: fix incorrect filename in documentation comment The underlying code uses GIT_CONFIG_FILENAME_GLOBAL, which is .gitconfig.
Etienne Samson 7283daa8 2018-10-01T21:00:15 doc: small fixups & additions
Carlos Martín Nieto 330b10ca 2018-09-17T21:53:58 revwalk: refer the sorting modes more to git's options Show more directly what the sorting modes correspond to in git's `rev-list` as that's the reference implementation for what the possible sorting orders are.
Patrick Steinhardt 7edc1c87 2018-08-30T12:51:05 Merge pull request #4788 from tiennou/doc-fixes Documentation fixes
Patrick Steinhardt db0c6648 2018-08-30T12:22:26 Merge pull request #4773 from RandomSort/giterr Document giterr_last() use only after error. #4772
Etienne Samson a4a028be 2018-08-29T22:49:35 diff: documentation mashup
Etienne Samson 9890f059 2018-08-29T22:04:42 push: make the parallelism default follow the docs
Etienne Samson 7765c0a9 2018-08-29T21:56:26 doc: fix comment on GIT_EUSER
Johan Abildskov c0b2e525 2018-08-27T09:23:02 Add two words to clarify
Edward Thomson 50186ce8 2018-08-26T11:26:45 Merge pull request #4374 from pks-t/pks/pack-file-verify Pack file verification
Johan Abildskov 4bd2a508 2018-08-20T13:51:28 Update giterr_last API documentation to reflect real behaviour
Patrick Steinhardt 42f83840 2018-07-26T15:25:44 Merge pull request #4721 from nelhage/max-objects Add a configurable limit to the max pack size that will be indexed
Patrick Steinhardt ea9e2c1a 2018-07-20T13:06:56 Merge pull request #4692 from tiennou/examples/checkout Add a checkout example
Nelson Elhage b3ca817e 2018-07-16T03:14:33 INDEXER_MAX_OBJECTS -> PACK_MAX_OBJECTS
Igor Djordjevic 9cab93c0 2018-07-13T21:29:01 ignore: improve `git_ignore_path_is_ignored` description Git analogy In attempt to provide adequate Git command analogy in regards to ignored files handling, `git_ignore_path_is_ignored` description mentions doing `git add .` on directory containing the file, and whether the file in question would be added or not - but behavior of the two matches for untracked files only, making the comparison misleading in general sense. For tracked files, Git doesn't subject them to ignore rules, so even if a rule applies, `git add .` would actually add the tracked file changes to index, while `git_ignore_path_is_ignored` would still consider the file being ignored (as it doesn't check the index, as documented). Let's provide `git check-ignore --no-index` as analogous Git command example instead, being more aligned with what `git_ignore_path_is_ignored` is about, no matter if the file in question is already tracked or not. See issue #4720 (git_ignore_path_is_ignored documentation misleading?, 2018-07-10)[1] for additional information. [1] https://github.com/libgit2/libgit2/issues/4720
Nelson Elhage efe3f37d 2018-07-12T04:20:15 Add a git_libgit2_opts option to set the max indexer object count
Etienne Samson 698b4463 2018-06-23T13:06:10 annotated_commit: make the refname accessible As git_annotated_commit seems to behave like cgit's refish, it's quite helpful to abstract away "targets" via git_annotated_commit_from_id/from_ref. As the former is accessible via git_annotated_commit_id, make the latter also available to users.
Edward Thomson c43658f6 2018-06-30T13:24:23 Merge pull request #4536 from libgit2/ethomson/index_dirty Add a "dirty" state to the index when it has unsaved changes
Edward Thomson bfa1f022 2018-06-22T19:17:08 settings: optional unsaved index safety Add the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option, which will cause commands that reload the on-disk index to fail if the current `git_index` has changed that have not been saved. This will prevent users from - for example - adding a file to the index then calling a function like `git_checkout` and having that file be silently removed from the index since it was re-read from disk. Now calls that would re-read the index will fail if the index is "dirty", meaning changes have been made to it but have not been written. Users can either `git_index_read` to discard those changes explicitly, or `git_index_write` to write them.
Edward Thomson 787768c2 2018-06-22T19:07:54 index: return a unique error code on dirty index When the index is dirty, return GIT_EINDEXDIRTY so that consumers can identify the exact problem programatically.
cynecx 630a6736 2018-02-07T22:30:27 refspec: add public parsing api Fix typo Fix some type issues More fixes Address requested changes Add test Fix naming Fix condition and tests Address requested changes Fix typo
Patrick Steinhardt 5ec4aee9 2017-11-12T10:35:18 indexer: add ability to select connectivity checks Right now, we simply turn on connectivity checks in the indexer as soon as we have access to an object database. But seeing that the connectivity checks may incur additional overhead, we do want the user to decide for himself whether he wants to allow those checks. Furthermore, it might also be desirable to check connectivity in case where no object database is given at all, e.g. in case where a fully connected pack file is expected. Add a flag `verify` to `git_indexer_options` to enable additional verification checks. Also avoid to query the ODB in case none is given to allow users to enable checks when they do not have an ODB.
Patrick Steinhardt c16556aa 2017-11-12T10:31:48 indexer: introduce options struct to `git_indexer_new` We strive to keep an options structure to many functions to be able to extend options in the future without breaking the API. `git_indexer_new` doesn't have one right now, but we want to be able to add an option for enabling strict packfile verification. Add a new `git_indexer_options` structure and adjust callers to use that.
Sven Strickroth b5818dda 2018-06-18T13:05:08 Fix last references to deprecated git_buf_free Signed-off-by: Sven Strickroth <email@cs-ware.de>
Nika Layzell f98131be 2018-06-17T00:40:25 Require the length argument to git_mailmap_from_buffer and make mailmap_add_buffer internal
Nika Layzell d91d2968 2018-06-14T16:49:48 mailmap: Hide EEXISTS to simplify git_mailmap_add_entry callers
Nika Layzell 56303e1a 2018-05-07T11:59:00 mailmap: API and style cleanup
Nika Layzell 8ff0504d 2018-04-08T03:01:14 mailmap: Rewrite API to support accurate mailmap resolution
Nika Layzell 18ff9bab 2018-03-27T22:48:03 mailmap: API and style cleanup
Nika Layzell 57cfeab9 2018-03-26T15:05:37 mailmap: Switch mailmap parsing to use the git_parse module
Emilio Cobos Álvarez 5c6c8a9b 2018-03-18T01:26:30 mailmap: Fix some other minor style nits
Nika Layzell 4ff44be8 2018-03-17T18:24:15 mailmap: Fix more bugs which snuck in when I rebased
Nika Layzell e3dcaca5 2018-03-17T18:15:01 mailmap: Integrate mailmaps with blame and signatures
Nika Layzell b05fbba3 2018-03-17T18:14:31 mailmap: Make everything a bit more style conforming
Nika Layzell 49620359 2018-03-17T02:29:41 mailmap: Clean up mailmap parser, and finish API
Emilio Cobos Álvarez 7a169390 2018-03-15T16:34:30 mailmap: WIP mailmap support
Edward Thomson 291cf12e 2018-06-12T12:40:11 Merge pull request #4680 from pks-t/pks/diff-opts-enum diff: fix enum value being out of allowed range
Patrick Steinhardt 2d9d2464 2018-06-12T10:34:10 diff: fix enum value being out of allowed range The C89 standard states in §6.7.2.2 "Enumeration specifiers": > The expression that defines the value of an enumeration constant shall > be an integer constant expression that has a value representable as an > int. On most platforms, this effectively limits the range to a 32 bit signed integer. The enum `git_diff_option_t` though recently gained an entry `GIT_DIFF_INDENT_HEURISTIC = (1u << 31)`, which breaks this limit. Fix the issue by using a gap in `git_diff_option_t`'s enum values. While this has the benefit of retaining our API, it may break applications which do not get recompiled after upgrading libgit2. But as we are bumping the soversion on each release anyway and thus force a recompile of dependents, this is not a problem.
Edward Thomson 3be73011 2018-06-11T18:26:22 Merge pull request #4436 from pks-t/pks/packfile-stream-free pack: rename `git_packfile_stream_free`
Patrick Steinhardt 56ffdfc6 2018-02-08T11:14:30 buffer: deprecate `git_buf_free` in favor of `git_buf_dispose`
Patrick Steinhardt 396e4960 2018-02-08T11:05:17 common.h: create `GIT_DEPRECATED` macro
Patrick Steinhardt 74b7ddbf 2018-03-16T10:14:50 settings: allow swapping out memory allocator 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.
Patrick Steinhardt 9865cd16 2018-03-20T14:23:49 alloc: make memory allocators use function pointers 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.
Carlos Martín Nieto 177dcfc7 2018-05-18T15:16:53 path: hide the dotgit file functions These can't go into the public API yet as we don't want to introduce API or ABI changes in a security release.
Carlos Martín Nieto 0aa65f8d 2018-05-16T15:56:04 path: add functions to detect .gitconfig and .gitattributes
Etienne Samson 04c48afc 2018-04-20T21:07:17 docs: standardize struct git_*_options comments
Etienne Samson c7b42f44 2018-04-11T22:26:31 docs: fix comment style
Etienne Samson 3ec35d9c 2018-03-26T20:23:59 attr: fix typo
Etienne Samson 78ea5adc 2018-03-22T23:27:35 branch: typo
Etienne Samson bf46d458 2018-03-22T23:27:34 docs: move blame options struct field comments
Etienne Samson 25e8a293 2018-03-22T23:27:31 docs: correct defgroup
Etienne Samson 29afb257 2018-03-22T23:27:30 docs: fix incorrect codeblock on output
Etienne Samson bf70fa4b 2018-03-22T23:27:28 docs: move comment so docurium sees it
Etienne Samson ca5a15e5 2018-03-22T23:27:27 docs: standardize comment block for git_*_init_options functions
Etienne Samson 8ee183a2 2018-03-22T23:27:25 docs: missing documentation comment
Etienne Samson f46c360e 2018-03-22T23:27:24 docs: move callback-specific documentation to the callback
Etienne Samson efad967a 2018-03-22T23:27:23 docs: fix some comment-marker typos
Etienne Samson 96576372 2018-03-22T23:27:21 docs: fix more missing includes
Etienne Samson 84bcae6c 2018-03-22T23:27:20 docs: add buffer.h & oid.h to types.h Otherwise docurium/clang chokes on the types, and ignores the documentation comments altogether.
Patrick Steinhardt b33b6d33 2018-04-30T09:27:47 Merge pull request #4640 from mkeeler/worktree-convenience2 worktree: add functions to get name and path
Matt Keeler 3da1ad20 2018-04-24T17:09:34 worktree: add functions to get name and path
Edward Thomson 5d346c11 2018-04-22T14:51:00 Merge pull request #4525 from pks-t/pks/config-iterate-in-order Configuration entry iteration in order
Edward Thomson 8529ac9b 2018-04-17T23:38:46 Merge pull request #4524 from pks-t/pks/worktree-refs worktree: add ability to create worktree with pre-existing branch
Patrick Steinhardt 0eca4230 2018-04-06T10:03:09 Merge pull request #4597 from cjhoward92/fix/cert-check-docs remote/proxy: fix git_transport_certificate_check_db description
Patrick Steinhardt a57f42ac 2018-04-06T09:40:34 Merge pull request #4587 from rcjsuen/patch-2 Flag options in describe.h as being optional
Carson Howard 370ecdb2 2018-03-27T10:10:09 types: remove unused git_merge_result `git_merge_result` is currently unused in the codebase and generates a blank page in the [documentation](https://libgit2.github.com/libgit2/#HEAD/type/git_merge_result).
Carson Howard e6c720ea 2018-03-27T10:05:21 remote/proxy: fix git_transport_certificate_check_db comment
Remy Suen db90e951 2018-03-27T20:09:45 Flag options in describe.h as being optional The git_describe_options in git_describe_commit and git_describe_workdir and the git_describe_format_options in git_describe_format are optional and can be NULL. State this in the documentation to make people's lives easier when calling these functions. Signed-off-by: Remy Suen <remy.suen@gmail.com>