summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
...
* Flag given_opts in git_revert as optionalRemy Suen2017-02-041-1/+1
| | | | The given_opts argument can actually be NULL and thus should be flagged accordingly in the header file.
* Update docs for git_oid_fromstrn and pMatthew Plough2017-01-271-5/+4
|
* parameter 'id' not found in the function declarationEtienne Samson2017-01-231-1/+1
|
* Merge branch 'pr/3912'Edward Thomson2017-01-211-0/+10
|\
| * symbolic ref target validation: fixupsEdward Thomson2017-01-211-10/+8
| | | | | | | | Fixups requested in #3912.
| * Make symbolic ref target validation optionalRichard Ipsum2016-08-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce GIT_OPT_ENABLE_SYMBOLIC_REF_TARGET_VALIDATION option. Setting this option to 0 allows validation of a symbolic ref's target to be bypassed. This option is enabled by default. This mechanism is added primarily to address a discrepancy between git behaviour and libgit2 behaviour, whereby the former allows the symbolic ref target to carry an arbitrary string and the latter does not, so: $ git symbolic-ref refs/heads/foo bar $ cat .git/refs/heads/foo ref: bar where as attempting the same via libgit2 raises an error: The given reference name 'bar' is not valid this mechanism also allows those that might want to make use of git's more lenient treatment of symbolic ref targets to do so.
* | Merge pull request #3892 from mitesch/shared_bufferEdward Thomson2017-01-211-0/+13
|\ \ | | | | | | Use a shared buffer in calls of git_treebuilder_write to avoid heap contention
| * | write_tree: use shared buffer for writing treesMichael Tesch2016-12-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function to write trees allocates a new buffer for each tree. This causes problems with performance when performing a lot of actions involving writing trees, e.g. when doing many merges. Fix the issue by instead handing in a shared buffer, which is then re-used across the calls without having to re-allocate between calls.
* | | Merge branch 'master' into pr/3938Edward Thomson2017-01-219-12/+72
|\ \ \
| * | | Allow for caching of submodules.Brock Peabody2017-01-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added `git_repository_submodule_cache_all` to initialze a cache of submodules on the repository so that operations looking up N submodules are O(N) and not O(N^2). Added a `git_repository_submodule_cache_clear` function to remove the cache. Also optimized the function that loads all submodules as it was itself O(N^2) w.r.t the number of submodules, having to loop through the `.gitmodules` file once per submodule. I changed it to process the `.gitmodules` file once, into a map. Signed-off-by: David Turner <dturner@twosigma.com>
| * | | merge: set default rename thresholdEdward Thomson2017-01-011-1/+2
| | | | | | | | | | | | | | | | | | | | When `GIT_MERGE_FIND_RENAMES` is set, provide a default for `rename_threshold` when it is unset.
| * | | Merge pull request #3980 from tiennou/doc-fixesv0.25.0-rc2v0.25.0Carlos Martín Nieto2016-12-203-5/+17
| |\ \ \ | | | | | | | | | | Documentation fixes
| | * | | transaction: fix documentationEtienne Samson2016-11-011-0/+9
| | | | |
| | * | | remote: fix documentation and indentEtienne Samson2016-11-011-1/+3
| | | | |
| | * | | remote: unused function typedefEtienne Samson2016-11-011-2/+0
| | | | |
| | * | | describe: fix documentationEtienne Samson2016-11-011-2/+5
| | | | |
| * | | | settings: clarify what each value meanscmn/https-cap-no-hardcodeCarlos Martín Nieto2016-12-171-0/+18
| | | | | | | | | | | | | | | | | | | | Most importantly, clarify what it means for HTTPS and SSH to be supported.
| * | | | remote: fix typo in git_fetch_init_options docsJosh Bleecher Snyder2016-12-021-1/+1
| | | | |
| * | | | Bump version number to v0.25cmn/bump-v25Carlos Martín Nieto2016-11-151-3/+3
| | | | |
| * | | | proxy: fix typo in documentationPatrick Steinhardt2016-11-011-1/+1
| |/ / /
| * | | patch: minor documentation fix.Davide Coppola2016-10-161-1/+1
| | | | | | | | | | | | | | | | Fix @return description of git_patch_num_lines_in_hunk.
* | | | Update submodule update opts init as per code reviewJosh Leeb-du Toit2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Update the `GIT_SUBMODULE_UPDATE_OPTIONS_INIT` definition with the correct values after removing `clone_checkout_strategy` in `git_submodule_update_options`.
* | | | Remove `clone_checkout_strategy` in submodule update optsJosh Leeb-du Toit2016-10-101-11/+2
|/ / / | | | | | | | | | | | | Remove `clone_checkout_strategy` in `git_submodule_update_options` as per issue #3784.
* | | docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabledethomson/settings_docsEdward Thomson2016-10-091-1/+2
| | | | | | | | | | | | | | | We changed the defaults on strict object creation - it is enabled by default. Update the documentation to reflect that.
* | | revwalk: update the description for the default sortingCarlos Martín Nieto2016-10-061-6/+4
| | | | | | | | | | | | | | | | | | It changed from implementation-defined to git's default sorting, as there are systems (e.g. rebase) which depend on this order. Also specify more explicitly how you can get git's "date-order".
* | | time: Export `git_time_monotonic`vmg/timeVicent Marti2016-09-131-0/+31
| | |
* | | diff: treat binary patches with no data specialethomson/diff-read-empty-binaryEdward Thomson2016-09-051-0/+8
| |/ |/| | | | | | | | | When creating and printing diffs, deal with binary deltas that have binary data specially, versus diffs that have a binary file but lack the actual binary data.
* | index: support index v4David Turner2016-08-101-0/+25
|/ | | | | | | Support reading and writing index v4. Index v4 uses a very simple compression scheme for pathnames, but is otherwise similar to index v3. Signed-off-by: David Turner <dturner@twitter.com>
* diff: document `git_diff_from_buffer`ethomson/doc_diff_from_bufferEdward Thomson2016-08-051-0/+19
|
* odb: freshen existing objects when writingEdward Thomson2016-08-041-0/+11
| | | | | | When writing an object, we calculate its OID and see if it exists in the object database. If it does, we need to freshen the file that contains it.
* git_diff_file: move `id_abbrev`ethomson/diff_fileEdward Thomson2016-08-031-6/+6
| | | | | Move `id_abbrev` to a more reasonable place where it packs more nicely (before anybody starts using it).
* packbuilder: `size_t` all the thingsEdward Thomson2016-07-241-4/+4
| | | | | | | | After 1cd65991, we were passing a pointer to an `unsigned long` to a function that now expected a pointer to a `size_t`. These types differ on 64-bit Windows, which means that we trash the stack. Use `size_t`s in the packbuilder to avoid this.
* Add get user agent functionality.Andrius Bentkus2016-07-051-0/+1
|
* Merge pull request #3711 from joshtriplett/git_repository_discover_defaultEdward Thomson2016-07-011-1/+20
|\ | | | | Add GIT_REPOSITORY_OPEN_FROM_ENV flag to respect $GIT_* environment vars
| * Add GIT_REPOSITORY_OPEN_FROM_ENV flag to respect $GIT_* environment varsJosh Triplett2016-06-241-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git_repository_open_ext provides parameters for the start path, whether to search across filesystems, and what ceiling directories to stop at. git commands have standard environment variables and defaults for each of those, as well as various other parameters of the repository. To avoid duplicate environment variable handling in users of libgit2, add a GIT_REPOSITORY_OPEN_FROM_ENV flag, which makes git_repository_open_ext automatically handle the appropriate environment variables. Commands that intend to act just like those built into git itself can use this flag to get the expected default behavior. git_repository_open_ext with the GIT_REPOSITORY_OPEN_FROM_ENV flag respects $GIT_DIR, $GIT_DISCOVERY_ACROSS_FILESYSTEM, $GIT_CEILING_DIRECTORIES, $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and $GIT_ALTERNATE_OBJECT_DIRECTORIES. In the future, when libgit2 gets worktree support, git_repository_open_env will also respect $GIT_WORK_TREE and $GIT_COMMON_DIR; until then, git_repository_open_ext with this flag will error out if either $GIT_WORK_TREE or $GIT_COMMON_DIR is set.
| * Add GIT_REPOSITORY_OPEN_NO_DOTGIT flag to avoid appending /.gitJosh Triplett2016-06-241-0/+4
| | | | | | | | | | | | | | | | | | | | GIT_REPOSITORY_OPEN_NO_SEARCH does not search up through parent directories, but still tries the specified path both directly and with /.git appended. GIT_REPOSITORY_OPEN_BARE avoids appending /.git, but opens the repository in bare mode even if it has a working directory. To support the semantics git uses when given $GIT_DIR in the environment, provide a new GIT_REPOSITORY_OPEN_NO_DOTGIT flag to not try appending /.git.
* | submodule: Try to fetch when update fails to find the target commit in the ↵Jason Haslam2016-06-281-3/+11
| | | | | | | | submodule.
* | Merge pull request #3223 from ethomson/applyEdward Thomson2016-06-252-8/+37
|\ \ | |/ |/| Reading patch files
| * Introduce `git_diff_to_buf`Edward Thomson2016-05-261-0/+15
| | | | | | | | | | Like `git_patch_to_buf`, provide a simple helper method that can print an entire diff directory to a `git_buf`.
| * introduce `git_diff_from_buffer` to parse diffsEdward Thomson2016-05-261-0/+5
| | | | | | | | Parse diff files into a `git_diff` structure.
| * patch: `git_patch_from_patchfile` -> `git_patch_from_buffer`Edward Thomson2016-05-261-26/+0
| |
| * Introduce git_patch_options, handle prefixesEdward Thomson2016-05-261-1/+14
| | | | | | | | | | Handle prefixes (in terms of number of path components) for patch parsing.
| * diff: include oid length in deltasEdward Thomson2016-05-261-1/+7
| | | | | | | | | | | | Now that `git_diff_delta` data can be produced by reading patch file data, which may have an abbreviated oid, allow consumers to know that the id is abbreviated.
| * Patch parsing from patch filesEdward Thomson2016-05-262-6/+21
| |
| * Introduce git_apply_patchEdward Thomson2016-05-261-1/+2
| | | | | | | | | | The beginnings of patch application from an existing (diff-created) git_patch object: applies the hunks of a git_patch to a buffer.
* | documentation: improve docs for `checkout_head`ethomson/checkout_head_docsEdward Thomson2016-06-151-0/+7
|/ | | | | `git_checkout_head` is sadly misunderstood as something that can switch branches. It cannot. Update the documentation to reflect this.
* Introduce a function to create a tree based on a different onecmn/tree-updateCarlos Martín Nieto2016-05-171-0/+46
| | | | | | | | | | | Instead of going through the usual steps of reading a tree recursively into an index, modifying it and writing it back out as a tree, introduce a function to perform simple updates more efficiently. `git_tree_create_updated` avoids reading trees which are not modified and supports upsert and delete operations. It is not as versatile as modifying the index, but it makes some common operations much more efficient.
* Introduce `git_signature_from_buffer`ethomson/signature_from_bufferEdward Thomson2016-04-281-0/+13
| | | | | Allow users to construct a signature from the type of signature lines that actually appear in commits.
* Remove traces of `git_blob_create_fromchunks`Arthur Schreiber2016-04-261-41/+0
|
* Allow creating copies of `git_reference` objects.Arthur Schreiber2016-04-221-0/+11
|