include/git2


Log

Author Commit Date CI Message
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
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>
Etienne Samson cdd0bc2f 2018-03-26T18:44:13 checkout: change default strategy to SAFE As per #4200, our default is quite surprising to users that expect checkout to just "do the thing".
Patrick Steinhardt 26cf48fc 2018-02-09T11:35:16 config_file: move include depth into config entry In order to reject writes to included configuration entries, we need to keep track of whether an entry was included via another configuration file or not. This information is being stored in the `cvar` structure, which is a rather weird location, as it is only used to create a list structure of config entries. Move the include depth into the structure `git_config_entry` instead. While this fixes the layering issue, it enables users of libgit2 to access the depth, too.
Patrick Steinhardt 937e7e26 2018-03-13T13:04:38 Merge pull request #4544 from josharian/docs pathspec: improve git_pathspec_flag_t doc rendering
Edward Thomson 358cc2e2 2018-03-12T09:50:00 Merge pull request #4396 from libgit2/cmn/config-regex-is-normalised config: specify how we match the regular expressions
Carlos Martín Nieto 2f89bd90 2018-03-11T12:36:13 config: explicitly state that subsections are case-sensitive
Jacques Germishuys 5f6383ca 2018-03-08T08:17:29 diff: ensure an unsigned number is shifted
Jacques Germishuys 12356076 2018-03-02T12:41:04 worktree: lock reason should be const
Josh Bleecher Snyder b72717b0 2018-02-23T08:19:49 pathspec: improve git_pathspec_flag_t doc rendering By placing docs per enum value rather than in a large block, the automated doc generation tool can make nicer docs, as could other automated tools, such as the mooted https://github.com/libgit2/git2go/issues/427. The current rendering is somewhat ugly: https://libgit2.github.com/libgit2/#HEAD/type/git_pathspec_flag_t No textual changes, just reorganization.
Patrick Steinhardt 23d4a91b 2018-02-16T08:38:44 Update version number to v0.27
Patrick Steinhardt a22f19e6 2018-02-09T10:38:11 worktree: add ability to create worktree with pre-existing branch Currently, we always create a new branch after the new worktree's name when creating a worktree. In some workflows, though, the caller may want to check out an already existing reference instead of creating a new one, which is impossible to do right now. Add a new option `ref` to the options structure for adding worktrees. In case it is set, a branch and not already checked out by another worktree, we will re-use this reference instead of creating a new one.
Edward Thomson 97f9a5f0 2017-12-17T01:12:49 odb: provide length and type with streaming read The streaming read functionality should provide the length and the type of the object, like the normal read functionality does.
Edward Thomson 9d8510b3 2018-01-31T09:28:43 Merge pull request #4488 from libgit2/ethomson/conflict_marker_size Use longer conflict markers in recursive merge base
Adrián Medraño Calvo d23ce187 2018-01-22T11:55:28 odb: export mempack backend Fixes #4492, #4496.
Edward Thomson b8e9467a 2018-01-20T19:39:34 merge: allow custom conflict marker size Allow for a custom conflict marker size, allowing callers to override the default size of the "<<<<<<<" and ">>>>>>>" markers in the conflicted output file.
Carlos Martín Nieto dcb668ba 2018-01-19T01:11:37 message: update docs for git_message_prettify We used to hard-code the octothorpe as the comment character and the documentation still mentions this even though we accept the comment character as a parameter. Update the line to indicate this and clean up the first paragraph a bit.
Brian Lopez 4893a9c0 2018-01-17T13:54:42 Merge pull request #4451 from libgit2/charliesome/trailer-info Implement message trailer parsing API
Brian Lopez 3e5239e4 2018-01-16T23:55:46 update code docs
Brian Lopez d43974fb 2018-01-16T13:40:26 Change trailer API to return a simple array
Patrick Steinhardt 5963292f 2018-01-12T13:03:19 refs: document need to free refs in foreach-callback References passed to the callback function of `git_reference_foreach` are expected to be owned by the callback. As such, they are never being freed by `git_reference_foreach`, but will have to be freed by the caller. This small detail is never mentioned in the function's documentation, though, making it easy to get wrong. Document this to make it discoverable.
Brian Lopez 5734768b 2018-01-10T19:19:34 Merge remote-tracking branch 'origin/master' into charliesome/trailer-info
Brian Lopez fb29ba09 2018-01-03T18:32:09 remove empty lines between @-lines
Brian Lopez e8bc8558 2018-01-02T13:29:49 Merge remote-tracking branch 'origin/master' into charliesome/trailer-info
Edward Thomson 346c1b16 2017-12-31T09:25:42 docs: git_treebuilder_insert validates entries The documentation for `git_treebuilder_insert` erroneously states that we do not validate that the entry being inserted exists. We do, as of https://github.com/libgit2/libgit2/pull/3633. Update the documentation to reflect the new reality.
Edward Thomson d6210245 2017-12-30T13:09:43 Merge pull request #4159 from richardipsum/notes-commit Support using notes via a commit rather than a ref
Charlie Somerville 1c43edca 2017-12-14T18:37:10 message: add routine for parsing trailers from messages This is implemented in trailer.c and borrows a large amount of logic from Git core to ensure compatibility.
Edward Thomson 429bb357 2017-12-01T11:45:53 Merge pull request #4318 from Uncommon/amend_status Add git_status_file_at
David Catmull 4ccacdc8 2017-07-21T17:07:10 status: Add a baseline field to git_status_options for comparing to trees other than HEAD
Carlos Martín Nieto 7e3faf58 2017-10-29T15:05:28 diff: expose the "indent heuristic" in the diff options We default to off, but we might want to consider changing `GIT_DIFF_NORMAL` to include it.
Carlos Martín Nieto 158a42a5 2017-11-04T15:28:35 config: specify how we match the regular expressions We do it the same as git does: case-sensitively on the normalized form of the variable name. While here also specify that we're case-sensitive on the values when handling the values when setting or deleting multivars.
Henry Kleynhans f063dafb 2017-11-12T10:56:50 signature: distinguish +0000 and -0000 UTC offsets Git considers '-0000' a valid offset for signature lines. They need to be treated as _not_ equal to a '+0000' signature offset. Parsing a signature line stores the offset in a signed integer which does not distinguish between `+0` and `-0`. This patch adds an additional flag `sign` to the `git_time` in the `signature` object which is populated with the sign of the offset. In addition to exposing this information to the user, this information is also used to compare signatures. /cc @pks-t @ethomson
Ken Dreyer 38169764 2017-11-10T16:19:39 describe.h: fix spelling in comments optios -> options
Patrick Steinhardt 529e873c 2017-05-23T11:51:00 config: pass repository when opening config files Our current configuration logic is completely oblivious of any repository, but only cares for actual file paths. Unfortunately, we are forced to break this assumption by the introduction of conditional includes, which are evaluated in the context of a repository. Right now, only one conditional exists with "gitdir:" -- it will only include the configuration if the current repository's git directory matches the value passed to "gitdir:". To support these conditionals, we have to break our API and make the repository available when opening a configuration file. This commit extends the `open` call of configuration backends to include another repository and adjusts existing code to have it available. This includes the user-visible functions `git_config_add_file_ondisk` and `git_config_add_backend`.
Patrick Steinhardt d02cf564 2017-05-23T12:56:41 repository: constify several repo parameters for getters Several functions to retrieve variables from a repository only return immutable values, which allows us to actually constify the passed-in repository parameter. Do so to help a later patch, which will only have access to a constant repository.
Richard Ipsum 60bee89d 2017-03-19T18:34:07 notes: Add git_note_commit_iterator_new This also adds tests for this function.
Richard Ipsum 9a02725d 2017-03-15T18:17:42 notes: Add git_note_commit_remove This also adds tests for this function.
Richard Ipsum 7096bf1e 2017-03-15T11:54:45 notes: Add git_note_commit_read This also adds tests for this function.
Richard Ipsum a46e743d 2017-09-23T17:46:46 notes: Add git_note_commit_create This adds a new function that will allow creation of notes without necessarily updating a particular ref, the notes tree is obtained from the git_commit object parameter, a new commit object pointing to the current tip of the notes tree is optionally returned via the 'note_commit_out' parameter, optionally the blob id for the note is returned through the 'note_blob_out' object.
Carson Howard 7138ce37 2017-10-06T07:16:26 remote: add typedef to normalize push_update_reference callback Very many callbacks in libgit2 have some sort of typedef to normalize the name at git_<name_of_operation>_cb. Add a typedef for push_update_references in the remote so the name follows the same conventions.
Jacob Wahlgren 56ac6c0a 2017-09-30T17:23:11 graph: document that a commit isn't a descendant of itself
Alpha 2a3cfc23 2017-08-11T17:15:51 Docs: Fix inline comments for git_diff_hunk
Edward Thomson a9d6b9d5 2017-07-31T01:20:21 Merge pull request #4304 from pks-t/pks/patch-buffers patch_generate: represent buffers as void pointers
Edward Thomson dca8c44f 2017-07-31T01:17:24 Merge pull request #4323 from libgit2/ethomson/remove_sys_remote_h Remove unused 'sys/remote.h' header
Edward Thomson fb585d01 2017-07-31T00:58:58 Merge branch '4233'
Edward Thomson 37841317 2017-07-31T00:38:28 Remove unused 'sys/remote.h' header
Edward Thomson a94a5402 2017-07-19T13:28:32 Merge pull request #4272 from pks-t/pks/patch-id Patch ID calculation