summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* config: fix incorrect filename in documentation commentEtienne Samson2018-10-011-1/+1
| | | The underlying code uses GIT_CONFIG_FILENAME_GLOBAL, which is .gitconfig.
* doc: small fixups & additionsEtienne Samson2018-10-013-19/+58
|
* revwalk: refer the sorting modes more to git's optionscmn/sorting-modesCarlos Martín Nieto2018-09-171-5/+5
| | | | | 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.
* Merge pull request #4788 from tiennou/doc-fixesPatrick Steinhardt2018-08-303-113/+154
|\ | | | | Documentation fixes
| * diff: documentation mashupEtienne Samson2018-08-291-111/+151
| |
| * push: make the parallelism default follow the docsEtienne Samson2018-08-291-1/+1
| |
| * doc: fix comment on GIT_EUSEREtienne Samson2018-08-291-1/+2
| |
* | Merge pull request #4773 from RandomSort/giterrPatrick Steinhardt2018-08-301-1/+6
|\ \ | |/ |/| Document giterr_last() use only after error. #4772
| * Add two words to clarifyJohan Abildskov2018-08-271-1/+1
| |
| * Update giterr_last API documentation to reflect real behaviourJohan Abildskov2018-08-201-1/+6
| |
* | Merge pull request #4374 from pks-t/pks/pack-file-verifyEdward Thomson2018-08-261-4/+30
|\ \ | |/ |/| Pack file verification
| * indexer: add ability to select connectivity checksPatrick Steinhardt2018-06-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * indexer: introduce options struct to `git_indexer_new`Patrick Steinhardt2018-06-221-4/+27
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #4721 from nelhage/max-objectsPatrick Steinhardt2018-07-261-1/+15
|\ \ | | | | | | Add a configurable limit to the max pack size that will be indexed
| * | INDEXER_MAX_OBJECTS -> PACK_MAX_OBJECTSNelson Elhage2018-07-161-4/+4
| | |
| * | Add a git_libgit2_opts option to set the max indexer object countNelson Elhage2018-07-121-1/+15
| | |
* | | Merge pull request #4692 from tiennou/examples/checkoutPatrick Steinhardt2018-07-201-0/+9
|\ \ \ | | | | | | | | Add a checkout example
| * | | annotated_commit: make the refname accessibleEtienne Samson2018-07-071-0/+9
| |/ / | | | | | | | | | | | | | | | 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.
* | | ignore: improve `git_ignore_path_is_ignored` description Git analogyIgor Djordjevic2018-07-141-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #4536 from libgit2/ethomson/index_dirtyEdward Thomson2018-06-302-1/+11
|\ \ | | | | | | Add a "dirty" state to the index when it has unsaved changes
| * | settings: optional unsaved index safetyEdward Thomson2018-06-291-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | index: return a unique error code on dirty indexEdward Thomson2018-06-291-0/+1
| |/ | | | | | | | | When the index is dirty, return GIT_EINDEXDIRTY so that consumers can identify the exact problem programatically.
* | refspec: add public parsing apicynecx2018-06-221-0/+17
|/ | | | | | | | | | | | | | | | | | | | Fix typo Fix some type issues More fixes Address requested changes Add test Fix naming Fix condition and tests Address requested changes Fix typo
* Fix last references to deprecated git_buf_freeSven Strickroth2018-06-182-2/+2
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Require the length argument to git_mailmap_from_buffer and make ↵Nika Layzell2018-06-171-17/+1
| | | | mailmap_add_buffer internal
* mailmap: Hide EEXISTS to simplify git_mailmap_add_entry callersNika Layzell2018-06-141-1/+1
|
* mailmap: API and style cleanupNika Layzell2018-06-143-15/+20
|
* mailmap: Rewrite API to support accurate mailmap resolutionNika Layzell2018-06-141-70/+60
|
* mailmap: API and style cleanupNika Layzell2018-06-141-1/+2
|
* mailmap: Switch mailmap parsing to use the git_parse moduleNika Layzell2018-06-141-24/+20
|
* mailmap: Fix some other minor style nitsEmilio Cobos Álvarez2018-06-141-2/+1
|
* mailmap: Fix more bugs which snuck in when I rebasedNika Layzell2018-06-141-2/+2
|
* mailmap: Integrate mailmaps with blame and signaturesNika Layzell2018-06-144-0/+54
|
* mailmap: Make everything a bit more style conformingNika Layzell2018-06-141-30/+31
|
* mailmap: Clean up mailmap parser, and finish APINika Layzell2018-06-141-16/+103
|
* mailmap: WIP mailmap supportEmilio Cobos Álvarez2018-06-141-0/+39
|
* Merge pull request #4680 from pks-t/pks/diff-opts-enumEdward Thomson2018-06-121-6/+6
|\ | | | | diff: fix enum value being out of allowed range
| * diff: fix enum value being out of allowed rangePatrick Steinhardt2018-06-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #4436 from pks-t/pks/packfile-stream-freeEdward Thomson2018-06-112-1/+24
|\ \ | |/ |/| pack: rename `git_packfile_stream_free`
| * buffer: deprecate `git_buf_free` in favor of `git_buf_dispose`Patrick Steinhardt2018-06-101-1/+13
| |
| * common.h: create `GIT_DEPRECATED` macroPatrick Steinhardt2018-06-101-0/+11
| |
* | settings: allow swapping out memory allocatorPatrick Steinhardt2018-06-072-0/+31
| | | | | | | | | | | | | | 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: standardize struct git_*_options commentsEtienne Samson2018-05-078-27/+26
|
* docs: fix comment styleEtienne Samson2018-05-071-3/+6
|
* attr: fix typoEtienne Samson2018-05-071-1/+1
|
* branch: typoEtienne Samson2018-05-071-1/+1
|
* docs: move blame options struct field commentsEtienne Samson2018-05-071-14/+17
|
* docs: correct defgroupEtienne Samson2018-05-071-1/+1
|