summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Fix documentation formattingpunkymaniac2021-04-221-13/+8
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | The return code description use '-' char as list of return value. But with the generation of the documentation the char '-' create an ambiguous return code value who seem an negative value.
* | | | | Merge branch 'zero_oid_in_old'Edward Thomson2021-05-161-0/+3
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | Manually merging #5842
| * | | | git_reference_create_matching: Treat all-zero OID as "must be absent"David Turner2021-04-201-0/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is pretty useful in avoiding races: I want to create a ref only if it doesn't already exist. I can't check first because of TOCTOU -- by the time I finish the check, someone else might have already created the ref. And I can't take a lock because then I can't do the create, since the create expects to take the lock. The semantics are inspired by git update-ref, which allows an all-zero old value to mean that the ref must not exist.
* | | | filter: deprecate git_filter_list_apply_to_dataEdward Thomson2021-05-062-13/+10
| | | | | | | | | | | | | | | | | | | | Deprecate `git_filter_list_apply_to_data` as it takes user input as a `git_buf`. Users should use `git_filter_list_apply_to_buffer` instead.
* | | | filter: introduce git_filter_list_apply_to_bufferEdward Thomson2021-05-061-0/+15
| | | | | | | | | | | | | | | | | | | | Provide a filter application mechanism that takes a user-provided string and length, instead of a `git_buf`.
* | | | filter: remove git_buf sharing in `git_filter_list_apply_to_data`Edward Thomson2021-05-061-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API `git_filter_list_apply_to_data` shares data between its out and in parameters to avoid unnecessarily copying it when there are no filters to apply. However, it does so in a manner that is potentially confusing, leaving both `git_buf`s populated with data. This is risky for end-users who have to know how to deal with this. Instead, we remove this optimization - users who want to avoid unnecessary copies can use the longstanding streaming API or check the filter status before invoking the filters.
* | | | filter: deprecate git_filter_list_stream_dataEdward Thomson2021-05-062-3/+29
|/ / / | | | | | | | | | | | | | | | | | | | | | `git_filter_list_stream_data` takes user input in a `git_buf`. `git_buf` should only be used when libgit2 itself needs to allocate data and returned to a user that they can free when they wish. Replace it with `git_filter_list_stream_buffer` that takes a data buffer and length.
* | | Merge pull request #5838 from mjsir911/msirabella/entrycount_typo_fixEdward Thomson2021-04-131-1/+1
|\ \ \ | |/ / |/| | Fix diff_entrycount -> diff_num_deltas doc typo
| * | Fix diff_entrycount -> diff_num_deltas doc typoMarco Sirabella2021-04-121-1/+1
| | | | | | | | | | | | | | | This just fixes a typo in the documentation, actual rename change was done in 5f69a31f
* | | Merge pull request #5815 from libgit2/ethomson/treebuilder_writeEdward Thomson2021-03-102-14/+27
|\ \ \ | | | | | | | | tree: deprecate `git_treebuilder_write_with_buffer`
| * | | tree: deprecate `git_treebuilder_write_with_buffer`Edward Thomson2021-03-042-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function `git_treebuilder_write_with_buffer` is unnecessary; it is used internally as part of treebuilder writing, but it has little use to external callers. For callers that repeatedly write a treebuilder, we can supply them with a buffer in the treebuilder struct instead of recreating it. For ourselves, when we want a single buffer in our write loop, we can use an internal function.
* | | | Merge pull request #5805 from tniessen/include-typosEdward Thomson2021-02-284-6/+6
|\ \ \ \ | | | | | | | | | | include: fix typos in comments
| * | | | include: fix typos in commentsTobias Nießen2021-02-224-6/+6
| |/ / /
* | | | Fix documentation formating on repository.hpunkymaniac2021-02-221-52/+95
|/ / / | | | | | | | | | | | | | | | The enum 'git_repository_init_flag_t', 'git_repository_init_mode_t' and the structure 'git_repository_init_options' does not follow the format used by docurium.
* | | Merge pull request #5731 from KOLANICH-libs/owner_accessorEdward Thomson2021-02-011-0/+8
|\ \ \ | | | | | | | | patch: add owner accessor
| * | | patch: add owner accessorJason Haslam2020-12-111-0/+8
| | | |
* | | | revspec: rename git_revparse_mode_t to git_revspec_tethomson/revparseEdward Thomson2021-01-312-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | The information about the type of a revision spec is not information about the parser. Name it accordingly, so that `git_revparse_mode_t` is now `git_revspec_t`. Deprecate the old name.
* | | | Merge pull request #5760 from libgit2/ethomson/tttoo_many_tttsEdward Thomson2021-01-072-4/+7
|\ \ \ \ | | | | | | | | | | blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`
| * | | | blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`ethomson/tttoo_many_tttsEdward Thomson2021-01-052-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD` is misspelled, it should be `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`, and it would be if it were not for the MacBook Pro keyboard and my inattentiveness.
* | | | | Update documentation for git_blob_filter_optionsJosh Stockin2021-01-051-1/+2
| | | | | | | | | | | | | | | | | | | | Adds info about initializing options with git_blob_filter_options_init
* | | | | blob: add git_blob_filter_options_initEdward Thomson2021-01-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `git_blob_filter_options_init` function should be included, to allow callers in FFI environments to let us initialize an options structure for them.
* | | | | Fix documentation for git_blob_filter_optionsJosh Stockin2021-01-041-1/+1
| | | | |
* | | | | Move doc comment about `GIT_BLOB_FILTER_OPTIONS_VERSION`Josh Stockin2021-01-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes doc comment on `git_blob_filter_options.version`, moves information to `git_blob_filter_options` doc comment to remain consistent with other options structures' documentation. `git_blob_filter_options_init` still needed; should be added in another commit/PR (it's out of the scope of this PR, #5759), update this documentation again.
* | | | | Add documentation for git_blob_filter_options.versionJosh Stockin2021-01-031-0/+1
|/ / / / | | | | | | | | | | | | Resolves #5756
* | | | Add support for additional hostkey types.Miguel Arroz2020-12-211-0/+8
|/ / / | | | | | | | | | Specifically: ECDSA_256, ECDSA_384, ECDSA_521 and ED25519.
* | | Also add the raw hostkey to `git_cert_hostkey`lhchavez2020-11-271-5/+33
| | | | | | | | | | | | | | | `git_cert_x509` has the raw encoded certificate. Let's do the same for the SSH certificate for symmetry.
* | | blob: use GIT_ASSERTEdward Thomson2020-11-251-1/+1
| | |
* | | Add git_tag_name_is_validSven Strickroth2020-10-251-0/+12
| | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | Add git_branch_name_is_validSven Strickroth2020-10-251-0/+12
| | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | remote: deprecate git_remote_is_valid_nameEdward Thomson2020-10-252-8/+21
| | |
* | | refs: introduce git_remote_name_is_validEdward Thomson2020-10-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Provide a function that can check remote name validity but can also signal when an error occurs. Use the name "name_is_valid", which is more suggestive of checking a given name, rather than "is_valid_name", which suggests that the function checks the validity of the current remote's name.
* | | refs: deprecate git_reference_is_valid_nameEdward Thomson2020-10-252-19/+21
| | |
* | | refs: introduce git_reference_name_is_validEdward Thomson2020-10-251-0/+17
|/ / | | | | | | | | | | | | | | Provide a function that can check reference name validity but can also signal when an error occurs. Use the name "name_is_valid", which is more suggestive of checking a given name, rather than "is_valid_name", which suggests that the function checks the validity of the current reference's name.
* | Release v1.1ethomson/v1.1Edward Thomson2020-10-121-3/+3
| |
* | Fixed typo in commentIkko Ashimine2020-10-041-1/+1
| | | | | | occured -> occurred
* | Fix deprecation links inside of documentation not workingSven Strickroth2020-09-101-1/+5
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | docs: fix typoSven2020-08-181-1/+1
| |
* | Review feedbacklhchavez2020-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | * Change the default of the file limit to 0 (unlimited). * Changed the heuristic to close files to be the file that contains the least-recently-used window such that the window is the most-recently-used in the file, and the file does not have in-use windows. * Parameterized the filelimit test to check for a limit of 1 and 100 open windows.
* | mwindow: set limit on number of open fileslhchavez2020-06-211-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some cases in which repositories accrue a large number of packfiles. The existing mwindow limit applies only to the total size of mmap'd files, not on their number. This leads to a situation in which having lots of small packfiles could exhaust the allowed number of open files, particularly on macOS, where the default ulimit is very low (256). This change adds a new configuration parameter (GIT_OPT_SET_MWINDOW_FILE_LIMIT) that sets the maximum number of open packfiles, with a default of 128. This is low enough so that even macOS users should not hit it during normal use. Based on PR #5386, originally written by @josharian. Fixes: #2758
* | Merge pull request #5419 from lhchavez/fix-git_index_add_from_buffer-docsPatrick Steinhardt2020-06-171-2/+1
|\ \ | | | | | | index: Update the documentation for git_index_add_from_buffer()
| * | index: Update the documentation for git_index_add_from_buffer()lhchavez2020-02-231-2/+1
| | | | | | | | | | | | | | | This change makes the docs reflect reality. The id and size were never updated in the entry!
* | | Merge pull request #5532 from joshtriplett/pack-default-pathEdward Thomson2020-06-021-1/+1
|\ \ \ | | | | | | | | git_packbuilder_write: Allow setting path to NULL to use the default path
| * | | git_packbuilder_write: Allow setting path to NULL to use the default pathJosh Triplett2020-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If given a NULL path, write to the object path of the repository. Add tests for the new behavior.
* | | | strarray: deprecate git_strarray_copyEdward Thomson2020-06-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | We should not be in the business of copying strings around for users. We either return a strarray that can be freed, or we take one (and do not mutate it).
* | | | strarray: we should `dispose` instead of `free`Edward Thomson2020-06-012-10/+30
|/ / / | | | | | | | | | | | | | | | We _dispose_ the contents of objects; we _free_ objects (and their contents). Update `git_strarray_free` to be `git_strarray_dispose`. `git_strarray_free` remains as a deprecated proxy function.
* | | Introduce GIT_ASSERT macrosEdward Thomson2020-05-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide macros to replace usages of `assert`. A true `assert` is punishing as a library. Instead we should do our best to not crash. GIT_ASSERT_ARG(x) will now assert that the given argument complies to some format and sets an error message and returns `-1` if it does not. GIT_ASSERT(x) is for internal usage, and available as an internal consistency check. It will set an error message and return `-1` in the event of failure.
* | | blame: add option to ignore whitespace changesCarl Schwan2020-04-141-0/+2
| | |
* | | version.h: bump version to v1.0.0Patrick Steinhardt2020-03-281-4/+4
| | |
* | | Merge pull request #5464 from pks-t/pks/refdb-backend-docsPatrick Steinhardt2020-03-261-2/+109
|\ \ \ | | | | | | | | refdb_backend: improve callback documentation
| * | | 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.