Blame CHANGELOG.md

Packit ae9e2a
v0.26.8
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This as a security release fixing the following list of issues:
Packit ae9e2a
Packit ae9e2a
- The function family `git__strtol` is used to parse integers
Packit ae9e2a
  from a buffer. As the functions do not take a buffer length as
Packit ae9e2a
  argument, they will scan either until the end of the current
Packit ae9e2a
  number or until a NUL byte is encountered. Many callers have
Packit ae9e2a
  been misusing the function and called it on potentially
Packit ae9e2a
  non-NUL-terminated buffers, resulting in possible out-of-bounds
Packit ae9e2a
  reads. Callers have been fixed to use `git__strntol` functions
Packit ae9e2a
  instead and `git__strtol` functions were removed.
Packit ae9e2a
Packit ae9e2a
- The function `git__strntol64` relied on the undefined behavior
Packit ae9e2a
  of signed integer overflows. While the code tried to detect
Packit ae9e2a
  such overflows after they have happened, this is unspecified
Packit ae9e2a
  behavior and may lead to weird behavior on uncommon platforms.
Packit ae9e2a
Packit ae9e2a
- In the case where `git__strntol32` was unable to parse an
Packit ae9e2a
  integer because it doesn't fit into an `int32_t`, it printed an
Packit ae9e2a
  error message containing the string that is currently being
Packit ae9e2a
  parsed. The code didn't truncate the string though, which
Packit ae9e2a
  caused it to print the complete string until a NUL byte is
Packit ae9e2a
  encountered and not only the currently parsed number. In case
Packit ae9e2a
  where the string was not NUL terminated, this could have lead
Packit ae9e2a
  to an out-of-bounds read.
Packit ae9e2a
Packit ae9e2a
- When parsing tags, all unknown fields that appear before the
Packit ae9e2a
  tag message are skipped. This skipping is done by using a plain
Packit ae9e2a
  `strstr(buffer, "\n\n")` to search for the two newlines that
Packit ae9e2a
  separate tag fields from tag message. As it is not possible to
Packit ae9e2a
  supply a buffer length to `strstr`, this call may skip over the
Packit ae9e2a
  buffer's end and thus result in an out of bounds read. As
Packit ae9e2a
  `strstr` may return a pointer that is out of bounds, the
Packit ae9e2a
  following computation of `buffer_end - buffer` will overflow
Packit ae9e2a
  and result in an allocation of an invalid length. Note that
Packit ae9e2a
  when reading objects from the object database, we make sure to
Packit ae9e2a
  always NUL terminate them, making the use of `strstr` safe.
Packit ae9e2a
Packit ae9e2a
- When parsing the "encoding" field of a commit, we may perform
Packit ae9e2a
  an out of bounds read due to using `git__prefixcmp` instead of
Packit ae9e2a
  `git__prefixncmp`. This can result in the parsed commit object
Packit ae9e2a
  containing uninitialized data in both its message encoding and
Packit ae9e2a
  message fields. Note that when reading objects from the object
Packit ae9e2a
  database, we make sure to always NUL terminate them, making the
Packit ae9e2a
  use of `strstr` safe.
Packit ae9e2a
Packit ae9e2a
v0.26.7
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This is a security release fixing the following list of issues:
Packit ae9e2a
Packit ae9e2a
- Submodule URLs and paths with a leading "-" are now ignored.
Packit ae9e2a
  This is due to the recently discovered CVE-2018-17456, which
Packit ae9e2a
  can lead to arbitrary code execution in upstream git. While
Packit ae9e2a
  libgit2 itself is not vulnerable, it can be used to inject
Packit ae9e2a
  options in an implementation which performs a recursive clone
Packit ae9e2a
  by executing an external command.
Packit ae9e2a
Packit ae9e2a
- When running repack while doing repo writes,
Packit ae9e2a
  `packfile_load__cb()` could see some temporary files in the
Packit ae9e2a
  directory that were bigger than the usual, and makes `memcmp`
Packit ae9e2a
  overflow on the `p->pack_name` string. This issue was reported
Packit ae9e2a
  and fixed by bisho.
Packit ae9e2a
Packit ae9e2a
- The configuration file parser used unbounded recursion to parse
Packit ae9e2a
  multiline variables, which could lead to a stack overflow. The
Packit ae9e2a
  issue was reported by the oss-fuzz project, issue 10048 and
Packit ae9e2a
  fixed by Nelson Elhage.
Packit ae9e2a
Packit ae9e2a
- The fix to the unbounded recursion introduced a memory leak in
Packit ae9e2a
  the config parser. While this leak was never in a public
Packit ae9e2a
  release, the oss-fuzz project reported this as issue 10127. The
Packit ae9e2a
  fix was implemented by Nelson Elhage and Patrick Steinhardt.
Packit ae9e2a
Packit ae9e2a
- When parsing "ok" packets received via the smart protocol, our
Packit ae9e2a
  parsing code did not correctly verify the bounds of the
Packit ae9e2a
  packets, which could result in a heap-buffer overflow. The
Packit ae9e2a
  issue was reported by the oss-fuzz project, issue 9749 and
Packit ae9e2a
  fixed by Patrick Steinhardt.
Packit ae9e2a
Packit ae9e2a
- The parsing code for the smart protocol has been tightened in
Packit ae9e2a
  general, fixing heap-buffer overflows when parsing the packet
Packit ae9e2a
  type as well as for "ACK" and "unpack" packets. The issue was
Packit ae9e2a
  discovered and fixed by Patrick Steinhardt.
Packit ae9e2a
Packit ae9e2a
- Fixed potential integer overflows on platforms with 16 bit
Packit ae9e2a
  integers when parsing packets for the smart protocol. The issue
Packit ae9e2a
  was discovered and fixed by Patrick Steinhardt.
Packit ae9e2a
Packit ae9e2a
- Fixed potential NULL pointer dereference when parsing
Packit ae9e2a
  configuration files which have "include.path" statements
Packit ae9e2a
  without a value.
Packit ae9e2a
Packit ae9e2a
v0.26.6
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This is a security release fixing out-of-bounds reads when
Packit ae9e2a
processing smart-protocol "ng" packets.
Packit ae9e2a
Packit ae9e2a
When parsing an "ng" packet, we keep track of both the current position
Packit ae9e2a
as well as the remaining length of the packet itself. But instead of
Packit ae9e2a
taking care not to exceed the length, we pass the current pointer's
Packit ae9e2a
position to `strchr`, which will search for a certain character until
Packit ae9e2a
hitting NUL. It is thus possible to create a crafted packet which
Packit ae9e2a
doesn't contain a NUL byte to trigger an out-of-bounds read.
Packit ae9e2a
Packit ae9e2a
The issue was discovered by the oss-fuzz project, issue 9406.
Packit ae9e2a
Packit ae9e2a
v0.26.5
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This is a security release fixing out-of-bounds reads when
Packit ae9e2a
reading objects from a packfile. This corresponds to
Packit ae9e2a
CVE-2018-10887 and CVE-2018-10888, which were both reported by
Packit ae9e2a
Riccardo Schirone.
Packit ae9e2a
Packit ae9e2a
When packing objects into a single so-called packfile, objects
Packit ae9e2a
may not get stored as complete copies but instead as deltas
Packit ae9e2a
against another object "base". A specially crafted delta object
Packit ae9e2a
could trigger an integer overflow and thus bypass our input
Packit ae9e2a
validation, which may result in copying memory before or after
Packit ae9e2a
the base object into the final deflated object. This may lead to
Packit ae9e2a
objects containing copies of system memory being written into the
Packit ae9e2a
object database. As the hash of those objects cannot be easily
Packit ae9e2a
controlled by the attacker, it is unlikely that any of those
Packit ae9e2a
objects will be valid and referenced by the commit graph.
Packit ae9e2a
Packit ae9e2a
Note that the error could also be triggered by the function
Packit ae9e2a
`git_apply__patch`. But as this function is not in use outside of
Packit ae9e2a
our test suite, it is not a possible attack vector.
Packit ae9e2a
Packit ae9e2a
v0.26.4
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This is a security release fixing insufficient validation of submodule names
Packit ae9e2a
(CVE-2018-11235, reported by Etienne Stalmans) and disallows `.gitmodules` files
Packit ae9e2a
as symlinks.
Packit ae9e2a
Packit ae9e2a
While submodule names come from the untrusted ".gitmodules" file, we blindly
Packit ae9e2a
append the name to "$GIT_DIR/modules" to construct the final path of the
Packit ae9e2a
submodule repository. In case the name contains e.g. "../", an adversary would
Packit ae9e2a
be able to escape your repository and write data at arbitrary paths. In
Packit ae9e2a
accordance with git, we now enforce some rules for submodule names which will
Packit ae9e2a
cause libgit2 to ignore these malicious names.
Packit ae9e2a
Packit ae9e2a
Adding a symlink as `.gitmodules` into the index from the workdir or checking
Packit ae9e2a
out such files is not allowed as this can make a Git implementation write
Packit ae9e2a
outside of the repository and bypass the `fsck` checks for CVE-2018-11235.
Packit ae9e2a
Packit ae9e2a
libgit2 is not susceptible to CVE-2018-11233.
Packit ae9e2a
Packit ae9e2a
v0.26.3
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This is a bugfix release. It includes the following non-exclusive list of
Packit ae9e2a
improvements, which have been backported from the master branch:
Packit ae9e2a
Packit ae9e2a
* Fix cloning of the libgit2 project with `git clone --recursive` by removing an
Packit ae9e2a
  invalid submodule from our testing data.
Packit ae9e2a
Packit ae9e2a
* Fix endianness of the port in `p_getaddrinfo()`.
Packit ae9e2a
Packit ae9e2a
* Fix handling of negative gitignore rules with wildcards.
Packit ae9e2a
Packit ae9e2a
* Fix handling of case-insensitive negative gitignore rules.
Packit ae9e2a
Packit ae9e2a
* Fix resolving references to a tag if the reference is stored with its fully
Packit ae9e2a
  resolved OID in the packed-refs file.
Packit ae9e2a
Packit ae9e2a
* Fix checkout not treating worktree files as modified when only their mode has
Packit ae9e2a
  changed.
Packit ae9e2a
Packit ae9e2a
* Fix rename detection with `GIT_DIFF_FIND_RENAMES_FROM_REWRITES`.
Packit ae9e2a
Packit ae9e2a
* Enable Windows 7 and earlier to use TLS 1.2.
Packit ae9e2a
Packit ae9e2a
v0.26.2
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
This is a security release fixing memory handling issues when reading crafted
Packit ae9e2a
repository index files. The issues allow for possible denial of service due to
Packit ae9e2a
allocation of large memory and out-of-bound reads.
Packit ae9e2a
Packit ae9e2a
As the index is never transferred via the network, exploitation requires an
Packit ae9e2a
attacker to have access to the local repository.
Packit ae9e2a
Packit ae9e2a
v0.26.1
Packit ae9e2a
---------
Packit ae9e2a
Packit ae9e2a
This is a security release fixing the following CVEs in the bundled zlib
Packit ae9e2a
library:
Packit ae9e2a
Packit ae9e2a
* CVE-2016-9843
Packit ae9e2a
* CVE-2016-9841
Packit ae9e2a
* CVE-2016-9842
Packit ae9e2a
* CVE-2016-9840
Packit ae9e2a
Packit ae9e2a
All users compiling libgit2 with the bundled zlib instead of using the
Packit ae9e2a
system-provided zlib must upgrade.
Packit ae9e2a
Packit ae9e2a
v0.26
Packit ae9e2a
-----
Packit ae9e2a
Packit ae9e2a
### Changes or improvements
Packit ae9e2a
Packit ae9e2a
* Support for opening, creating and modifying worktrees.
Packit ae9e2a
Packit ae9e2a
* We can now detect SHA1 collisions resulting from the SHAttered attack. These
Packit ae9e2a
  checks can be enabled at build time via `-DUSE_SHA1DC`.
Packit ae9e2a
Packit ae9e2a
* Fix for missing implementation of `git_merge_driver_source` getters.
Packit ae9e2a
Packit ae9e2a
* Fix for installed pkg-config file being broken when the prefix contains
Packit ae9e2a
  spaces.
Packit ae9e2a
Packit ae9e2a
* We now detect when the hashsum of on-disk objects does not match their
Packit ae9e2a
  expected hashsum.
Packit ae9e2a
Packit ae9e2a
* We now support open-ended ranges (e.g. "master..", "...master") in our
Packit ae9e2a
  revision range parsing code.
Packit ae9e2a
Packit ae9e2a
* We now correctly compute ignores with leading "/" in subdirectories.
Packit ae9e2a
Packit ae9e2a
* We now optionally call `fsync` on loose objects, packfiles and their indexes,
Packit ae9e2a
  loose references and packed reference files.
Packit ae9e2a
Packit ae9e2a
* We can now build against OpenSSL v1.1 and against LibreSSL.
Packit ae9e2a
Packit ae9e2a
* `GIT_MERGE_OPTIONS_INIT` now includes a setting to perform rename detection.
Packit ae9e2a
  This aligns this structure with the default by `git_merge` and
Packit ae9e2a
  `git_merge_trees` when `NULL` was provided for the options.
Packit ae9e2a
Packit ae9e2a
* Improvements for reading index v4 files.
Packit ae9e2a
Packit ae9e2a
* Perform additional retries for filesystem operations on Windows when files
Packit ae9e2a
  are temporarily locked by other processes.
Packit ae9e2a
Packit ae9e2a
### API additions
Packit ae9e2a
Packit ae9e2a
* New family of functions to handle worktrees:
Packit ae9e2a
Packit ae9e2a
    * `git_worktree_list()` lets you look up worktrees for a repository.
Packit ae9e2a
    * `git_worktree_lookup()` lets you get a specific worktree.
Packit ae9e2a
    * `git_worktree_open_from_repository()` lets you get the associated worktree
Packit ae9e2a
      of a repository.
Packit ae9e2a
      a worktree.
Packit ae9e2a
    * `git_worktree_add` lets you create new worktrees.
Packit ae9e2a
    * `git_worktree_prune` lets you remove worktrees from disk.
Packit ae9e2a
    * `git_worktree_lock()` and `git_worktree_unlock()` let you lock
Packit ae9e2a
      respectively unlock a worktree.
Packit ae9e2a
    * `git_repository_open_from_worktree()` lets you open a repository via
Packit ae9e2a
    * `git_repository_head_for_worktree()` lets you get the current `HEAD` for a
Packit ae9e2a
      linked worktree.
Packit ae9e2a
    * `git_repository_head_detached_for_worktree()` lets you check whether a
Packit ae9e2a
      linked worktree is in detached HEAD mode.
Packit ae9e2a
Packit ae9e2a
* `git_repository_item_path()` lets you retrieve paths for various repository
Packit ae9e2a
  files.
Packit ae9e2a
Packit ae9e2a
* `git_repository_commondir()` lets you retrieve the common directory of a
Packit ae9e2a
  repository.
Packit ae9e2a
Packit ae9e2a
* `git_branch_is_checked_out()` allows you to check whether a branch is checked
Packit ae9e2a
  out in a repository or any of its worktrees.
Packit ae9e2a
Packit ae9e2a
* `git_repository_submodule_cache_all()` and
Packit ae9e2a
  `git_repository_submodule_cache_clear()` functions allow you to prime or clear
Packit ae9e2a
  the submodule cache of a repository.
Packit ae9e2a
Packit ae9e2a
* You can disable strict hash verifications via the
Packit ae9e2a
  `GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION` option with `git_libgit2_opts()`.
Packit ae9e2a
Packit ae9e2a
* You can enable us calling `fsync` for various files inside the ".git"
Packit ae9e2a
  directory by setting the `GIT_OPT_ENABLE_FSYNC_GITDIR` option with
Packit ae9e2a
  `git_libgit2_opts()`.
Packit ae9e2a
Packit ae9e2a
* You can now enable "offset deltas" when creating packfiles and negotiating
Packit ae9e2a
  packfiles with a remote server by setting `GIT_OPT_ENABLE_OFS_DELTA` option
Packit ae9e2a
  with `GIT_libgit2_opts()`.
Packit ae9e2a
Packit ae9e2a
* You can now set the default share mode on Windows for opening files using
Packit ae9e2a
  `GIT_OPT_SET_WINDOWS_SHAREMODE` option with `git_libgit2_opts()`.
Packit ae9e2a
  You can query the current share mode with `GIT_OPT_GET_WINDOWS_SHAREMODE`.
Packit ae9e2a
Packit ae9e2a
* `git_transport_smart_proxy_options()' enables you to get the proxy options for
Packit ae9e2a
  smart transports.
Packit ae9e2a
Packit ae9e2a
* The `GIT_FILTER_INIT` macro and the `git_filter_init` function are provided
Packit ae9e2a
  to initialize a `git_filter` structure.
Packit ae9e2a
Packit ae9e2a
### Breaking API changes
Packit ae9e2a
Packit ae9e2a
* `clone_checkout_strategy` has been removed from
Packit ae9e2a
  `git_submodule_update_option`. The checkout strategy used to clone will
Packit ae9e2a
  be the same strategy specified in `checkout_opts`.
Packit ae9e2a
Packit ae9e2a
v0.25
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
### Changes or improvements
Packit ae9e2a
Packit ae9e2a
* Fix repository discovery with `git_repository_discover` and
Packit ae9e2a
  `git_repository_open_ext` to match git's handling of a ceiling
Packit ae9e2a
  directory at the current directory. git only checks ceiling
Packit ae9e2a
  directories when its search ascends to a parent directory.  A ceiling
Packit ae9e2a
  directory matching the starting directory will not prevent git from
Packit ae9e2a
  finding a repository in the starting directory or a parent directory.
Packit ae9e2a
Packit ae9e2a
* Do not fail when deleting remotes in the presence of broken
Packit ae9e2a
  global configs which contain branches.
Packit ae9e2a
Packit ae9e2a
* Support for reading and writing git index v4 files
Packit ae9e2a
Packit ae9e2a
* Improve the performance of the revwalk and bring us closer to git's code.
Packit ae9e2a
Packit ae9e2a
* The reference db has improved support for concurrency and returns `GIT_ELOCKED`
Packit ae9e2a
  when an operation could not be performed due to locking.
Packit ae9e2a
Packit ae9e2a
* Nanosecond resolution is now activated by default, following git's change to
Packit ae9e2a
  do this.
Packit ae9e2a
Packit ae9e2a
* We now restrict the set of ciphers we let OpenSSL use by default.
Packit ae9e2a
Packit ae9e2a
* Users can now register their own merge drivers for use with `.gitattributes`.
Packit ae9e2a
  The library also gained built-in support for the union merge driver.
Packit ae9e2a
Packit ae9e2a
* The default for creating references is now to validate that the object does
Packit ae9e2a
  exist.
Packit ae9e2a
Packit ae9e2a
* Add `git_proxy_options` which is used by the different networking
Packit ae9e2a
  implementations to let the caller specify the proxy settings instead of
Packit ae9e2a
  relying on the environment variables.
Packit ae9e2a
Packit ae9e2a
### API additions
Packit ae9e2a
Packit ae9e2a
* You can now get the user-agent used by libgit2 using the
Packit ae9e2a
  `GIT_OPT_GET_USER_AGENT` option with `git_libgit2_opts()`.
Packit ae9e2a
  It is the counterpart to `GIT_OPT_SET_USER_AGENT`.
Packit ae9e2a
Packit ae9e2a
* The `GIT_OPT_SET_SSL_CIPHERS` option for `git_libgit2_opts()` lets you specify
Packit ae9e2a
  a custom list of ciphers to use for OpenSSL.
Packit ae9e2a
Packit ae9e2a
* `git_commit_create_buffer()` creates a commit and writes it into a
Packit ae9e2a
  user-provided buffer instead of writing it into the object db. Combine it with
Packit ae9e2a
  `git_commit_create_with_signature()` in order to create a commit with a
Packit ae9e2a
  cryptographic signature.
Packit ae9e2a
Packit ae9e2a
* `git_blob_create_fromstream()` and
Packit ae9e2a
  `git_blob_create_fromstream_commit()` allow you to create a blob by
Packit ae9e2a
  writing into a stream. Useful when you do not know the final size or
Packit ae9e2a
  want to copy the contents from another stream.
Packit ae9e2a
Packit ae9e2a
* New flags for `git_repository_open_ext`:
Packit ae9e2a
Packit ae9e2a
    * `GIT_REPOSITORY_OPEN_NO_DOTGIT` - Do not check for a repository by
Packit ae9e2a
      appending `/.git` to the `start_path`; only open the repository if
Packit ae9e2a
      `start_path` itself points to the git directory.
Packit ae9e2a
    * `GIT_REPOSITORY_OPEN_FROM_ENV` - Find and open a git repository,
Packit ae9e2a
      respecting the environment variables used by the git command-line
Packit ae9e2a
      tools. If set, `git_repository_open_ext` will ignore the other
Packit ae9e2a
      flags and the `ceiling_dirs` argument, and will allow a NULL
Packit ae9e2a
      `path` to use `GIT_DIR` or search from the current directory. The
Packit ae9e2a
      search for a repository will respect `$GIT_CEILING_DIRECTORIES`
Packit ae9e2a
      and `$GIT_DISCOVERY_ACROSS_FILESYSTEM`.  The opened repository
Packit ae9e2a
      will respect `$GIT_INDEX_FILE`, `$GIT_NAMESPACE`,
Packit ae9e2a
      `$GIT_OBJECT_DIRECTORY`, and `$GIT_ALTERNATE_OBJECT_DIRECTORIES`.
Packit ae9e2a
      In the future, this flag will also cause `git_repository_open_ext`
Packit ae9e2a
      to respect `$GIT_WORK_TREE` and `$GIT_COMMON_DIR`; currently,
Packit ae9e2a
      `git_repository_open_ext` with this flag will error out if either
Packit ae9e2a
      `$GIT_WORK_TREE` or `$GIT_COMMON_DIR` is set.
Packit ae9e2a
Packit ae9e2a
* `git_diff_from_buffer()` can create a `git_diff` object from the contents
Packit ae9e2a
  of a git-style patch file.
Packit ae9e2a
Packit ae9e2a
* `git_index_version()` and `git_index_set_version()` to get and set
Packit ae9e2a
  the index version
Packit ae9e2a
Packit ae9e2a
* `git_odb_expand_ids()` lets you check for the existence of multiple
Packit ae9e2a
  objects at once.
Packit ae9e2a
Packit ae9e2a
* The new `git_blob_dup()`, `git_commit_dup()`, `git_tag_dup()` and
Packit ae9e2a
  `git_tree_dup()` functions provide type-specific wrappers for
Packit ae9e2a
  `git_object_dup()` to reduce noise and increase type safety for callers.
Packit ae9e2a
Packit ae9e2a
* `git_reference_dup()` lets you duplicate a reference to aid in ownership
Packit ae9e2a
  management and cleanup.
Packit ae9e2a
Packit ae9e2a
* `git_signature_from_buffer()` lets you create a signature from a string in the
Packit ae9e2a
  format that appear in objects.
Packit ae9e2a
Packit ae9e2a
* `git_tree_create_updated()` lets you create a tree based on another one
Packit ae9e2a
  together with a list of updates. For the covered update cases, it's more
Packit ae9e2a
  efficient than the `git_index` route.
Packit ae9e2a
Packit ae9e2a
* `git_apply_patch()` applies hunks from a `git_patch` to a buffer.
Packit ae9e2a
Packit ae9e2a
* `git_diff_to_buf()` lets you print an entire diff directory to a buffer,
Packit ae9e2a
  similar to how `git_patch_to_buf()` works.
Packit ae9e2a
Packit ae9e2a
* `git_proxy_init_options()` is added to initialize a `git_proxy_options`
Packit ae9e2a
  structure at run-time.
Packit ae9e2a
Packit ae9e2a
* `git_merge_driver_register()`, `git_merge_driver_unregister()` let you
Packit ae9e2a
  register and unregister a custom merge driver to be used when `.gitattributes`
Packit ae9e2a
  specifies it.
Packit ae9e2a
Packit ae9e2a
* `git_merge_driver_lookup()` can be used to look up a merge driver by name.
Packit ae9e2a
Packit ae9e2a
* `git_merge_driver_source_repo()`, `git_merge_driver_source_ancestor()`,
Packit ae9e2a
  `git_merge_driver_source_ours()`, `git_merge_driver_source_theirs()`,
Packit ae9e2a
  `git_merge_driver_source_file_options()` added as accessors to
Packit ae9e2a
  `git_merge_driver_source`.
Packit ae9e2a
Packit ae9e2a
### API removals
Packit ae9e2a
Packit ae9e2a
* `git_blob_create_fromchunks()` has been removed in favour of
Packit ae9e2a
  `git_blob_create_fromstream()`.
Packit ae9e2a
Packit ae9e2a
### Breaking API changes
Packit ae9e2a
Packit ae9e2a
* `git_packbuilder_object_count` and `git_packbuilder_written` now
Packit ae9e2a
  return a `size_t` instead of a `uint32_t` for more thorough
Packit ae9e2a
  compatibility with the rest of the library.
Packit ae9e2a
Packit ae9e2a
* `git_packbuiler_progress` now provides explicitly sized `uint32_t`
Packit ae9e2a
  values instead of `unsigned int`.
Packit ae9e2a
Packit ae9e2a
* `git_diff_file` now includes an `id_abbrev` field that reflects the
Packit ae9e2a
  number of nibbles set in the `id` field.
Packit ae9e2a
Packit ae9e2a
* `git_odb_backend` now has a `freshen` function pointer.  This optional
Packit ae9e2a
  function pointer is similar to the `exists` function, but it will update
Packit ae9e2a
  a last-used marker.  For filesystem-based object databases, this updates
Packit ae9e2a
  the timestamp of the file containing the object, to indicate "freshness".
Packit ae9e2a
  If this is `NULL`, then it will not be called and the `exists` function
Packit ae9e2a
  will be used instead.
Packit ae9e2a
Packit ae9e2a
* `git_remote_connect()` now accepts `git_proxy_options` argument, and
Packit ae9e2a
  `git_fetch_options` and `git_push_options` each have a `proxy_opts` field.
Packit ae9e2a
Packit ae9e2a
* `git_merge_options` now provides a `default_driver` that can be used
Packit ae9e2a
  to provide the name of a merge driver to be used to handle files changed
Packit ae9e2a
  during a merge.
Packit ae9e2a
Packit ae9e2a
v0.24
Packit ae9e2a
-------
Packit ae9e2a
Packit ae9e2a
### Changes or improvements
Packit ae9e2a
Packit ae9e2a
* Custom merge drivers can now be registered, which allows callers to
Packit ae9e2a
  configure callbacks to honor `merge=driver` configuration in
Packit ae9e2a
  `.gitattributes`.
Packit ae9e2a
Packit ae9e2a
* Custom filters can now be registered with wildcard attributes, for
Packit ae9e2a
  example `filter=*`.  Consumers should examine the attributes parameter
Packit ae9e2a
  of the `check` function for details.
Packit ae9e2a
Packit ae9e2a
* Symlinks are now followed when locking a file, which can be
Packit ae9e2a
  necessary when multiple worktrees share a base repository.
Packit ae9e2a
Packit ae9e2a
* You can now set your own user-agent to be sent for HTTP requests by
Packit ae9e2a
  using the `GIT_OPT_SET_USER_AGENT` with `git_libgit2_opts()`.
Packit ae9e2a
Packit ae9e2a
* You can set custom HTTP header fields to be sent along with requests
Packit ae9e2a
  by passing them in the fetch and push options.
Packit ae9e2a
Packit ae9e2a
* Tree objects are now assumed to be sorted. If a tree is not
Packit ae9e2a
  correctly formed, it will give bad results. This is the git approach
Packit ae9e2a
  and cuts a significant amount of time when reading the trees.
Packit ae9e2a
Packit ae9e2a
* Filter registration is now protected against concurrent
Packit ae9e2a
  registration.
Packit ae9e2a
Packit ae9e2a
* Filenames which are not valid on Windows in an index no longer cause
Packit ae9e2a
  to fail to parse it on that OS.
Packit ae9e2a
Packit ae9e2a
* Rebases can now be performed purely in-memory, without touching the
Packit ae9e2a
  repository's workdir.
Packit ae9e2a
Packit ae9e2a
* When adding objects to the index, or when creating new tree or commit
Packit ae9e2a
  objects, the inputs are validated to ensure that the dependent objects
Packit ae9e2a
  exist and are of the correct type.  This object validation can be
Packit ae9e2a
  disabled with the GIT_OPT_ENABLE_STRICT_OBJECT_CREATION option.
Packit ae9e2a
Packit ae9e2a
* The WinHTTP transport's handling of bad credentials now behaves like
Packit ae9e2a
  the others, asking for credentials again.
Packit ae9e2a
Packit ae9e2a
### API additions
Packit ae9e2a
Packit ae9e2a
* `git_config_lock()` has been added, which allow for
Packit ae9e2a
  transactional/atomic complex updates to the configuration, removing
Packit ae9e2a
  the opportunity for concurrent operations and not committing any
Packit ae9e2a
  changes until the unlock.
Packit ae9e2a
Packit ae9e2a
* `git_diff_options` added a new callback `progress_cb` to report on the
Packit ae9e2a
  progress of the diff as files are being compared. The documentation of
Packit ae9e2a
  the existing callback `notify_cb` was updated to reflect that it only
Packit ae9e2a
  gets called when new deltas are added to the diff.
Packit ae9e2a
Packit ae9e2a
* `git_fetch_options` and `git_push_options` have gained a `custom_headers`
Packit ae9e2a
  field to set the extra HTTP header fields to send.
Packit ae9e2a
Packit ae9e2a
* `git_stream_register_tls()` lets you register a callback to be used
Packit ae9e2a
  as the constructor for a TLS stream instead of the libgit2 built-in
Packit ae9e2a
  one.
Packit ae9e2a
Packit ae9e2a
* `git_commit_header_field()` allows you to look up a specific header
Packit ae9e2a
  field in a commit.
Packit ae9e2a
Packit ae9e2a
* `git_commit_extract_signature()` extracts the signature from a
Packit ae9e2a
  commit and gives you both the signature and the signed data so you
Packit ae9e2a
  can verify it.
Packit ae9e2a
Packit ae9e2a
### API removals
Packit ae9e2a
Packit ae9e2a
* No APIs were removed in this version.
Packit ae9e2a
Packit ae9e2a
### Breaking API changes
Packit ae9e2a
Packit ae9e2a
* The `git_merge_tree_flag_t` is now `git_merge_flag_t`.  Subsequently,
Packit ae9e2a
  its members are no longer prefixed with `GIT_MERGE_TREE_FLAG` but are
Packit ae9e2a
  now prefixed with `GIT_MERGE_FLAG`, and the `tree_flags` field of the
Packit ae9e2a
  `git_merge_options` structure is now named `flags`.
Packit ae9e2a
Packit ae9e2a
* The `git_merge_file_flags_t` enum is now `git_merge_file_flag_t` for
Packit ae9e2a
  consistency with other enum type names.
Packit ae9e2a
Packit ae9e2a
* `git_cert` descendent types now have a proper `parent` member
Packit ae9e2a
Packit ae9e2a
* It is the responsibility of the refdb backend to decide what to do
Packit ae9e2a
  with the reflog on ref deletion. The file-based backend must delete
Packit ae9e2a
  it, a database-backed one may wish to archive it.
Packit ae9e2a
Packit ae9e2a
* `git_config_backend` has gained two entries. `lock` and `unlock`
Packit ae9e2a
  with which to implement the transactional/atomic semantics for the
Packit ae9e2a
  configuration backend.
Packit ae9e2a
Packit ae9e2a
* `git_index_add` and `git_index_conflict_add()` will now use the case
Packit ae9e2a
  as provided by the caller on case insensitive systems.  Previous
Packit ae9e2a
  versions would keep the case as it existed in the index.  This does
Packit ae9e2a
  not affect the higher-level `git_index_add_bypath` or
Packit ae9e2a
  `git_index_add_frombuffer` functions.
Packit ae9e2a
Packit ae9e2a
* The `notify_payload` field of `git_diff_options` was renamed to `payload`
Packit ae9e2a
  to reflect that it's also the payload for the new progress callback.
Packit ae9e2a
Packit ae9e2a
* The `git_config_level_t` enum has gained a higher-priority value
Packit ae9e2a
  `GIT_CONFIG_LEVEL_PROGRAMDATA` which represent a rough Windows equivalent
Packit ae9e2a
  to the system level configuration.
Packit ae9e2a
Packit ae9e2a
* `git_rebase_options` now has a `merge_options` field.
Packit ae9e2a
Packit ae9e2a
* The index no longer performs locking itself. This is not something
Packit ae9e2a
  users of the library should have been relying on as it's not part of
Packit ae9e2a
  the concurrency guarantees.
Packit ae9e2a
Packit ae9e2a
* `git_remote_connect()` now takes a `custom_headers` argument to set
Packit ae9e2a
  the extra HTTP header fields to send.
Packit ae9e2a
Packit ae9e2a
v0.23
Packit ae9e2a
------
Packit ae9e2a
Packit ae9e2a
### Changes or improvements
Packit ae9e2a
Packit ae9e2a
* Patience and minimal diff drivers can now be used for merges.
Packit ae9e2a
Packit ae9e2a
* Merges can now ignore whitespace changes.
Packit ae9e2a
Packit ae9e2a
* Updated binary identification in CRLF filtering to avoid false positives in
Packit ae9e2a
  UTF-8 files.
Packit ae9e2a
Packit ae9e2a
* Rename and copy detection is enabled for small files.
Packit ae9e2a
Packit ae9e2a
* Checkout can now handle an initial checkout of a repository, making
Packit ae9e2a
  `GIT_CHECKOUT_SAFE_CREATE` unnecessary for users of clone.
Packit ae9e2a
Packit ae9e2a
* The signature parameter in the ref-modifying functions has been
Packit ae9e2a
  removed. Use `git_repository_set_ident()` and
Packit ae9e2a
  `git_repository_ident()` to override the signature to be used.
Packit ae9e2a
Packit ae9e2a
* The local transport now auto-scales the number of threads to use
Packit ae9e2a
  when creating the packfile instead of sticking to one.
Packit ae9e2a
Packit ae9e2a
* Reference renaming now uses the right id for the old value.
Packit ae9e2a
Packit ae9e2a
* The annotated version of branch creation, HEAD detaching and reset
Packit ae9e2a
  allow for specifying the expression from the user to be put into the
Packit ae9e2a
  reflog.
Packit ae9e2a
Packit ae9e2a
* `git_rebase_commit` now returns `GIT_EUNMERGED` when you attempt to
Packit ae9e2a
  commit with unstaged changes.
Packit ae9e2a
Packit ae9e2a
* On Mac OS X, we now use SecureTransport to provide the cryptographic
Packit ae9e2a
  support for HTTPS connections insead of OpenSSL.
Packit ae9e2a
Packit ae9e2a
* Checkout can now accept an index for the baseline computations via the
Packit ae9e2a
  `baseline_index` member.
Packit ae9e2a
Packit ae9e2a
* The configuration for fetching is no longer stored inside the
Packit ae9e2a
  `git_remote` struct but has been moved to a `git_fetch_options`. The
Packit ae9e2a
  remote functions now take these options or the callbacks instead of
Packit ae9e2a
  setting them beforehand.
Packit ae9e2a
Packit ae9e2a
* `git_submodule` instances are no longer cached or shared across
Packit ae9e2a
  lookup. Each submodule represents the configuration at the time of
Packit ae9e2a
  loading.
Packit ae9e2a
Packit ae9e2a
* The index now uses diffs for `add_all()` and `update_all()` which
Packit ae9e2a
  gives it a speed boost and closer semantics to git.
Packit ae9e2a
Packit ae9e2a
* The ssh transport now reports the stderr output from the server as
Packit ae9e2a
  the error message, which allows you to get the "repository not
Packit ae9e2a
  found" messages.
Packit ae9e2a
Packit ae9e2a
* `git_index_conflict_add()` will remove staged entries that exist for
Packit ae9e2a
  conflicted paths.
Packit ae9e2a
Packit ae9e2a
* The flags for a `git_diff_file` will now have the `GIT_DIFF_FLAG_EXISTS`
Packit ae9e2a
  bit set when a file exists on that side of the diff.  This is useful
Packit ae9e2a
  for understanding whether a side of the diff exists in the presence of
Packit ae9e2a
  a conflict.
Packit ae9e2a
Packit ae9e2a
* The constructor for a write-stream into the odb now takes
Packit ae9e2a
  `git_off_t` instead of `size_t` for the size of the blob, which
Packit ae9e2a
  allows putting large files into the odb on 32-bit systems.
Packit ae9e2a
Packit ae9e2a
* The remote's push and pull URLs now honor the url.$URL.insteadOf
Packit ae9e2a
  configuration. This allows modifying URL prefixes to a custom
Packit ae9e2a
  value via gitconfig.
Packit ae9e2a
Packit ae9e2a
* `git_diff_foreach`, `git_diff_blobs`, `git_diff_blob_to_buffer`,
Packit ae9e2a
  and `git_diff_buffers` now accept a new binary callback of type
Packit ae9e2a
  `git_diff_binary_cb` that includes the binary diff information.
Packit ae9e2a
Packit ae9e2a
* The race condition mitigations described in `racy-git.txt` have been
Packit ae9e2a
  implemented.
Packit ae9e2a
Packit ae9e2a
* If libcurl is installed, we will use it to connect to HTTP(S)
Packit ae9e2a
  servers.
Packit ae9e2a
Packit ae9e2a
### API additions
Packit ae9e2a
Packit ae9e2a
* The `git_merge_options` gained a `file_flags` member.
Packit ae9e2a
Packit ae9e2a
* Parsing and retrieving a configuration value as a path is exposed
Packit ae9e2a
  via `git_config_parse_path()` and `git_config_get_path()`
Packit ae9e2a
  respectively.
Packit ae9e2a
Packit ae9e2a
* `git_repository_set_ident()` and `git_repository_ident()` serve to
Packit ae9e2a
  set and query which identity will be used when writing to the
Packit ae9e2a
  reflog.
Packit ae9e2a
Packit ae9e2a
* `git_config_entry_free()` frees a config entry.
Packit ae9e2a
Packit ae9e2a
* `git_config_get_string_buf()` provides a way to safely retrieve a
Packit ae9e2a
  string from a non-snapshot configuration.
Packit ae9e2a
Packit ae9e2a
* `git_annotated_commit_from_revspec()` allows to get an annotated
Packit ae9e2a
  commit from an extended sha synatx string.
Packit ae9e2a
Packit ae9e2a
* `git_repository_set_head_detached_from_annotated()`,
Packit ae9e2a
  `git_branch_create_from_annotated()` and
Packit ae9e2a
  `git_reset_from_annotated()` allow for the caller to provide an
Packit ae9e2a
  annotated commit through which they can control what expression is
Packit ae9e2a
  put into the reflog as the source/target.
Packit ae9e2a
Packit ae9e2a
* `git_index_add_frombuffer()` can now create a blob from memory
Packit ae9e2a
  buffer and add it to the index which is attached to a repository.
Packit ae9e2a
Packit ae9e2a
* The structure `git_fetch_options` has been added to determine the
Packit ae9e2a
  runtime configuration for fetching, such as callbacks, pruning and
Packit ae9e2a
  autotag behaviour. It has the runtime initializer
Packit ae9e2a
  `git_fetch_init_options()`.
Packit ae9e2a
Packit ae9e2a
* The enum `git_fetch_prune_t` has been added, letting you specify the
Packit ae9e2a
  pruning behaviour for a fetch.
Packit ae9e2a
Packit ae9e2a
* A push operation will notify the caller of what updates it indends
Packit ae9e2a
  to perform on the remote, which provides similar information to
Packit ae9e2a
  git's pre-push hook.
Packit ae9e2a
Packit ae9e2a
* `git_stash_apply()` can now apply a stashed state from the stash list,
Packit ae9e2a
  placing the data into the working directory and index.
Packit ae9e2a
Packit ae9e2a
* `git_stash_pop()` will apply a stashed state (like `git_stash_apply()`)
Packit ae9e2a
  but will remove the stashed state after a successful application.
Packit ae9e2a
Packit ae9e2a
* A new error code `GIT_EEOF` indicates an early EOF from the
Packit ae9e2a
  server. This typically indicates an error with the URL or
Packit ae9e2a
  configuration of the server, and tools can use this to show messages
Packit ae9e2a
  about failing to communicate with the server.
Packit ae9e2a
Packit ae9e2a
* A new error code `GIT_EINVALID` indicates that an argument to a
Packit ae9e2a
  function is invalid, or an invalid operation was requested.
Packit ae9e2a
Packit ae9e2a
* `git_diff_index_to_workdir()` and `git_diff_tree_to_index()` will now
Packit ae9e2a
  produce deltas of type `GIT_DELTA_CONFLICTED` to indicate that the index
Packit ae9e2a
  side of the delta is a conflict.
Packit ae9e2a
Packit ae9e2a
* The `git_status` family of functions will now produce status of type
Packit ae9e2a
  `GIT_STATUS_CONFLICTED` to indicate that a conflict exists for that file
Packit ae9e2a
  in the index.
Packit ae9e2a
Packit ae9e2a
* `git_index_entry_is_conflict()` is a utility function to determine if
Packit ae9e2a
  a given index entry has a non-zero stage entry, indicating that it is
Packit ae9e2a
  one side of a conflict.
Packit ae9e2a
Packit ae9e2a
* It is now possible to pass a keypair via a buffer instead of a
Packit ae9e2a
  path. For this, `GIT_CREDTYPE_SSH_MEMORY` and
Packit ae9e2a
  `git_cred_ssh_key_memory_new()` have been added.
Packit ae9e2a
Packit ae9e2a
* `git_filter_list_contains` will indicate whether a particular
Packit ae9e2a
  filter will be run in the given filter list.
Packit ae9e2a
Packit ae9e2a
* `git_commit_header_field()` has been added, which allows retrieving
Packit ae9e2a
  the contents of an arbitrary header field.
Packit ae9e2a
Packit ae9e2a
* `git_submodule_set_branch()` allows to set the configured branch for
Packit ae9e2a
  a submodule.
Packit ae9e2a
Packit ae9e2a
### API removals
Packit ae9e2a
Packit ae9e2a
* `git_remote_save()` and `git_remote_clear_refspecs()` have been
Packit ae9e2a
  removed. Remote's configuration is changed via the configuration
Packit ae9e2a
  directly or through a convenience function which performs changes to
Packit ae9e2a
  the configuration directly.
Packit ae9e2a
Packit ae9e2a
* `git_remote_set_callbacks()`, `git_remote_get_callbacks()` and
Packit ae9e2a
  `git_remote_set_transport()` have been removed and the remote no
Packit ae9e2a
  longer stores this configuration.
Packit ae9e2a
Packit ae9e2a
* `git_remote_set_fetch_refpecs()` and
Packit ae9e2a
  `git_remote_set_push_refspecs()` have been removed. There is no
Packit ae9e2a
  longer a way to set the base refspecs at run-time.
Packit ae9e2a
Packit ae9e2a
* `git_submodule_save()` has been removed. The submodules are no
Packit ae9e2a
  longer configured via the objects.
Packit ae9e2a
Packit ae9e2a
* `git_submodule_reload_all()` has been removed as we no longer cache
Packit ae9e2a
  submodules.
Packit ae9e2a
Packit ae9e2a
### Breaking API changes
Packit ae9e2a
Packit ae9e2a
* `git_smart_subtransport_cb` now has a `param` parameter.
Packit ae9e2a
Packit ae9e2a
* The `git_merge_options` structure member `flags` has been renamed
Packit ae9e2a
  to `tree_flags`.
Packit ae9e2a
Packit ae9e2a
* The `git_merge_file_options` structure member `flags` is now
Packit ae9e2a
  an unsigned int. It was previously a `git_merge_file_flags_t`.
Packit ae9e2a
Packit ae9e2a
* `GIT_CHECKOUT_SAFE_CREATE` has been removed.  Most users will generally
Packit ae9e2a
  be able to switch to `GIT_CHECKOUT_SAFE`, but if you require missing
Packit ae9e2a
  file handling during checkout, you may now use `GIT_CHECKOUT_SAFE |
Packit ae9e2a
  GIT_CHECKOUT_RECREATE_MISSING`.
Packit ae9e2a
Packit ae9e2a
* The `git_clone_options` and `git_submodule_update_options`
Packit ae9e2a
  structures no longer have a `signature` field.
Packit ae9e2a
Packit ae9e2a
* The following functions have removed the signature and/or log message
Packit ae9e2a
  parameters in favour of git-emulating ones.
Packit ae9e2a
Packit ae9e2a
    * `git_branch_create()`, `git_branch_move()`
Packit ae9e2a
    * `git_rebase_init()`, `git_rebase_abort()`
Packit ae9e2a
    * `git_reference_symbolic_create_matching()`,
Packit ae9e2a
      `git_reference_symbolic_create()`, `git_reference_create()`,
Packit ae9e2a
      `git_reference_create_matching()`,
Packit ae9e2a
      `git_reference_symbolic_set_target()`,
Packit ae9e2a
      `git_reference_set_target()`, `git_reference_rename()`
Packit ae9e2a
    * `git_remote_update_tips()`, `git_remote_fetch()`, `git_remote_push()`
Packit ae9e2a
    * `git_repository_set_head()`,
Packit ae9e2a
      `git_repository_set_head_detached()`,
Packit ae9e2a
      `git_repository_detach_head()`
Packit ae9e2a
    * `git_reset()`
Packit ae9e2a
Packit ae9e2a
* `git_config_get_entry()` now gives back a ref-counted
Packit ae9e2a
  `git_config_entry`. You must free it when you no longer need it.
Packit ae9e2a
Packit ae9e2a
* `git_config_get_string()` will return an error if used on a
Packit ae9e2a
  non-snapshot configuration, as there can be no guarantee that the
Packit ae9e2a
  returned pointer is valid.
Packit ae9e2a
Packit ae9e2a
* `git_note_default_ref()` now uses a `git_buf` to return the string,
Packit ae9e2a
  as the string is otherwise not guaranteed to stay allocated.
Packit ae9e2a
Packit ae9e2a
* `git_rebase_operation_current()` will return `GIT_REBASE_NO_OPERATION`
Packit ae9e2a
  if it is called immediately after creating a rebase session but before
Packit ae9e2a
  you have applied the first patch.
Packit ae9e2a
Packit ae9e2a
* `git_rebase_options` now contains a `git_checkout_options` struct
Packit ae9e2a
  that will be used for functions that modify the working directory,
Packit ae9e2a
  namely `git_rebase_init`, `git_rebase_next` and
Packit ae9e2a
  `git_rebase_abort`.  As a result, `git_rebase_open` now also takes
Packit ae9e2a
  a `git_rebase_options` and only the `git_rebase_init` and
Packit ae9e2a
  `git_rebase_open` functions take a `git_rebase_options`, where they
Packit ae9e2a
  will persist the options to subsequent `git_rebase` calls.
Packit ae9e2a
Packit ae9e2a
* The `git_clone_options` struct now has fetch options in a
Packit ae9e2a
  `fetch_opts` field instead of remote callbacks in
Packit ae9e2a
  `remote_callbacks`.
Packit ae9e2a
Packit ae9e2a
* The remote callbacks has gained a new member `push_negotiation`
Packit ae9e2a
  which gets called before sending the update commands to the server.
Packit ae9e2a
Packit ae9e2a
* The following functions no longer act on a remote instance but
Packit ae9e2a
  change the repository's configuration. Their signatures have changed
Packit ae9e2a
  accordingly:
Packit ae9e2a
Packit ae9e2a
    * `git_remote_set_url()`, `git_remote_seturl()`
Packit ae9e2a
    * `git_remote_add_fetch()`, `git_remote_add_push()` and
Packit ae9e2a
    * `git_remote_set_autotag()`
Packit ae9e2a
Packit ae9e2a
* `git_remote_connect()` and `git_remote_prune()` now take a pointer
Packit ae9e2a
  to the callbacks.
Packit ae9e2a
Packit ae9e2a
* `git_remote_fetch()` and `git_remote_download()` now take a pointer
Packit ae9e2a
  to fetch options which determine the runtime configuration.
Packit ae9e2a
Packit ae9e2a
* The `git_remote_autotag_option_t` values have been changed. It has
Packit ae9e2a
  gained a `_UNSPECIFIED` default value to specify no override for the
Packit ae9e2a
  configured setting.
Packit ae9e2a
Packit ae9e2a
* `git_remote_update_tips()` now takes a pointer to the callbacks as
Packit ae9e2a
  well as a boolean whether to write `FETCH_HEAD` and the autotag
Packit ae9e2a
  setting.
Packit ae9e2a
Packit ae9e2a
* `git_remote_create_anonymous()` no longer takes a fetch refspec as
Packit ae9e2a
  url-only remotes cannot have configured refspecs.
Packit ae9e2a
Packit ae9e2a
* The `git_submodule_update_options` struct now has fetch options in
Packit ae9e2a
  the `fetch_opts` field instead of callbacks in the
Packit ae9e2a
  `remote_callbacks` field.
Packit ae9e2a
Packit ae9e2a
* The following functions no longer act on a submodule instance but
Packit ae9e2a
  change the repository's configuration. Their signatures have changed
Packit ae9e2a
  accordingly:
Packit ae9e2a
Packit ae9e2a
    * `git_submodule_set_url()`, `git_submodule_set_ignore()`,
Packit ae9e2a
      `git_submodule_set_update()`,
Packit ae9e2a
      `git_submodule_set_fetch_recurse_submodules()`.
Packit ae9e2a
Packit ae9e2a
* `git_submodule_status()` no longer takes a submodule instance but a
Packit ae9e2a
  repsitory, a submodule name and an ignore setting.
Packit ae9e2a
Packit ae9e2a
* The `push` function in the `git_transport` interface now takes a
Packit ae9e2a
  pointer to the remote callbacks.
Packit ae9e2a
Packit ae9e2a
* The `git_index_entry` struct's fields' types have been changed to
Packit ae9e2a
  more accurately reflect what is in fact stored in the
Packit ae9e2a
  index. Specifically, time and file size are 32 bits intead of 64, as
Packit ae9e2a
  these values are truncated.
Packit ae9e2a
Packit ae9e2a
* `GIT_EMERGECONFLICT` is now `GIT_ECONFLICT`, which more accurately
Packit ae9e2a
  describes the nature of the error.
Packit ae9e2a
Packit ae9e2a
* It is no longer allowed to call `git_buf_grow()` on buffers
Packit ae9e2a
  borrowing the memory they point to.
Packit ae9e2a
Packit ae9e2a
v0.22
Packit ae9e2a
------
Packit ae9e2a
Packit ae9e2a
### Changes or improvements
Packit ae9e2a
Packit ae9e2a
* `git_signature_new()` now requires a non-empty email address.
Packit ae9e2a
Packit ae9e2a
* Use CommonCrypto libraries for SHA-1 calculation on Mac OS X.
Packit ae9e2a
Packit ae9e2a
* Disable SSL compression and SSLv2 and SSLv3 ciphers in favor of TLSv1
Packit ae9e2a
  in OpenSSL.
Packit ae9e2a
Packit ae9e2a
* The fetch behavior of remotes with autotag set to `GIT_REMOTE_DOWNLOAD_TAGS_ALL`
Packit ae9e2a
  has been changed to match git 1.9.0 and later. In this mode, libgit2 now
Packit ae9e2a
  fetches all tags in addition to whatever else needs to be fetched.
Packit ae9e2a
Packit ae9e2a
* `git_checkout()` now handles case-changing renames correctly on
Packit ae9e2a
  case-insensitive filesystems; for example renaming "readme" to "README".
Packit ae9e2a
Packit ae9e2a
* The search for libssh2 is now done via pkg-config instead of a
Packit ae9e2a
  custom search of a few directories.
Packit ae9e2a
Packit ae9e2a
* Add support for core.protectHFS and core.protectNTFS. Add more
Packit ae9e2a
  validation for filenames which we write such as references.
Packit ae9e2a
Packit ae9e2a
* The local transport now generates textual progress output like
Packit ae9e2a
  git-upload-pack does ("counting objects").
Packit ae9e2a
Packit ae9e2a
* `git_checkout_index()` can now check out an in-memory index that is not
Packit ae9e2a
  necessarily the repository's index, so you may check out an index
Packit ae9e2a
  that was produced by git_merge and friends while retaining the cached
Packit ae9e2a
  information.
Packit ae9e2a
Packit ae9e2a
* Remove the default timeout for receiving / sending data over HTTP using
Packit ae9e2a
  the WinHTTP transport layer.
Packit ae9e2a
Packit ae9e2a
* Add SPNEGO (Kerberos) authentication using GSSAPI on Unix systems.
Packit ae9e2a
Packit ae9e2a
* Provide built-in objects for the empty blob (e69de29) and empty
Packit ae9e2a
  tree (4b825dc) objects.
Packit ae9e2a
Packit ae9e2a
* The index' tree cache is now filled upon read-tree and write-tree
Packit ae9e2a
  and the cache is written to disk.
Packit ae9e2a
Packit ae9e2a
* LF -> CRLF filter refuses to handle mixed-EOL files
Packit ae9e2a
Packit ae9e2a
* LF -> CRLF filter now runs when * text = auto (with Git for Windows 1.9.4)
Packit ae9e2a
Packit ae9e2a
* File unlocks are atomic again via rename. Read-only files on Windows are
Packit ae9e2a
  made read-write if necessary.
Packit ae9e2a
Packit ae9e2a
* Share open packfiles across repositories to share descriptors and mmaps.
Packit ae9e2a
Packit ae9e2a
* Use a map for the treebuilder, making insertion O(1)
Packit ae9e2a
Packit ae9e2a
* The build system now accepts an option EMBED_SSH_PATH which when set
Packit ae9e2a
  tells it to include a copy of libssh2 at the given location. This is
Packit ae9e2a
  enabled for MSVC.
Packit ae9e2a
Packit ae9e2a
* Add support for refspecs with the asterisk in the middle of a
Packit ae9e2a
  pattern.
Packit ae9e2a
Packit ae9e2a
* Fetching now performs opportunistic updates. To achieve this, we
Packit ae9e2a
  introduce a difference between active and passive refspecs, which
Packit ae9e2a
  make `git_remote_download()` and `git_remote_fetch()` to take a list of
Packit ae9e2a
  resfpecs to be the active list, similarly to how git fetch accepts a
Packit ae9e2a
  list on the command-line.
Packit ae9e2a
Packit ae9e2a
* The THREADSAFE option to build libgit2 with threading support has
Packit ae9e2a
  been flipped to be on by default.
Packit ae9e2a
Packit ae9e2a
* The remote object has learnt to prune remote-tracking branches. If
Packit ae9e2a
  the remote is configured to do so, this will happen via
Packit ae9e2a
  `git_remote_fetch()`. You can also call `git_remote_prune()` after
Packit ae9e2a
  connecting or fetching to perform the prune.
Packit ae9e2a
Packit ae9e2a
Packit ae9e2a
### API additions
Packit ae9e2a
Packit ae9e2a
* Introduce `git_buf_text_is_binary()` and `git_buf_text_contains_nul()` for
Packit ae9e2a
  consumers to perform binary detection on a git_buf.
Packit ae9e2a
Packit ae9e2a
* `git_branch_upstream_remote()` has been introduced to provide the
Packit ae9e2a
  branch.<name>.remote configuration value.
Packit ae9e2a
Packit ae9e2a
* Introduce `git_describe_commit()` and `git_describe_workdir()` to provide
Packit ae9e2a
  a description of the current commit (and working tree, respectively)
Packit ae9e2a
  based on the nearest tag or reference
Packit ae9e2a
Packit ae9e2a
* Introduce `git_merge_bases()` and the `git_oidarray` type to expose all
Packit ae9e2a
  merge bases between two commits.
Packit ae9e2a
Packit ae9e2a
* Introduce `git_merge_bases_many()` to expose all merge bases between
Packit ae9e2a
  multiple commits.
Packit ae9e2a
Packit ae9e2a
* Introduce rebase functionality (using the merge algorithm only).
Packit ae9e2a
  Introduce `git_rebase_init()` to begin a new rebase session,
Packit ae9e2a
  `git_rebase_open()` to open an in-progress rebase session,
Packit ae9e2a
  `git_rebase_commit()` to commit the current rebase operation,
Packit ae9e2a
  `git_rebase_next()` to apply the next rebase operation,
Packit ae9e2a
  `git_rebase_abort()` to abort an in-progress rebase and `git_rebase_finish()`
Packit ae9e2a
  to complete a rebase operation.
Packit ae9e2a
Packit ae9e2a
* Introduce `git_note_author()` and `git_note_committer()` to get the author
Packit ae9e2a
  and committer information on a `git_note`, respectively.
Packit ae9e2a
Packit ae9e2a
* A factory function for ssh has been added which allows to change the
Packit ae9e2a
  path of the programs to execute for receive-pack and upload-pack on
Packit ae9e2a
  the server, `git_transport_ssh_with_paths()`.
Packit ae9e2a
Packit ae9e2a
* The ssh transport supports asking the remote host for accepted
Packit ae9e2a
  credential types as well as multiple challeges using a single
Packit ae9e2a
  connection. This requires to know which username you want to connect
Packit ae9e2a
  as, so this introduces the USERNAME credential type which the ssh
Packit ae9e2a
  transport will use to ask for the username.
Packit ae9e2a
Packit ae9e2a
* The `GIT_EPEEL` error code has been introduced when we cannot peel a tag
Packit ae9e2a
  to the requested object type; if the given object otherwise cannot be
Packit ae9e2a
  peeled, `GIT_EINVALIDSPEC` is returned.
Packit ae9e2a
Packit ae9e2a
* Introduce `GIT_REPOSITORY_INIT_RELATIVE_GITLINK` to use relative paths
Packit ae9e2a
  when writing gitlinks, as is used by git core for submodules.
Packit ae9e2a
Packit ae9e2a
* `git_remote_prune()` has been added. See above for description.
Packit ae9e2a
Packit ae9e2a
Packit ae9e2a
* Introduce reference transactions, which allow multiple references to
Packit ae9e2a
  be locked at the same time and updates be queued. This also allows
Packit ae9e2a
  us to safely update a reflog with arbitrary contents, as we need to
Packit ae9e2a
  do for stash.
Packit ae9e2a
Packit ae9e2a
### API removals
Packit ae9e2a
Packit ae9e2a
* `git_remote_supported_url()` and `git_remote_is_valid_url()` have been
Packit ae9e2a
  removed as they have become essentially useless with rsync-style ssh paths.
Packit ae9e2a
Packit ae9e2a
* `git_clone_into()` and `git_clone_local_into()` have been removed from the
Packit ae9e2a
  public API in favour of `git_clone callbacks`.
Packit ae9e2a
Packit ae9e2a
* The option to ignore certificate errors via `git_remote_cert_check()`
Packit ae9e2a
  is no longer present. Instead, `git_remote_callbacks` has gained a new
Packit ae9e2a
  entry which lets the user perform their own certificate checks.
Packit ae9e2a
Packit ae9e2a
### Breaking API changes
Packit ae9e2a
Packit ae9e2a
* `git_cherry_pick()` is now `git_cherrypick()`.
Packit ae9e2a
Packit ae9e2a
* The `git_submodule_update()` function was renamed to
Packit ae9e2a
  `git_submodule_update_strategy()`. `git_submodule_update()` is now used to
Packit ae9e2a
  provide functionalty similar to "git submodule update".
Packit ae9e2a
Packit ae9e2a
* `git_treebuilder_create()` was renamed to `git_treebuilder_new()` to better
Packit ae9e2a
  reflect it being a constructor rather than something which writes to
Packit ae9e2a
  disk.
Packit ae9e2a
Packit ae9e2a
* `git_treebuilder_new()` (was `git_treebuilder_create()`) now takes a
Packit ae9e2a
  repository so that it can query repository configuration.
Packit ae9e2a
  Subsequently, `git_treebuilder_write()` no longer takes a repository.
Packit ae9e2a
Packit ae9e2a
* `git_threads_init()` and `git_threads_shutdown()` have been renamed to
Packit ae9e2a
  `git_libgit2_init()` and `git_libgit2_shutdown()` to better explain what
Packit ae9e2a
  their purpose is, as it's grown to be more than just about threads.
Packit ae9e2a
Packit ae9e2a
* `git_libgit2_init()` and `git_libgit2_shutdown()` now return the number of
Packit ae9e2a
  initializations of the library, so consumers may schedule work on the
Packit ae9e2a
  first initialization.
Packit ae9e2a
Packit ae9e2a
* The `git_transport_register()` function no longer takes a priority and takes
Packit ae9e2a
  a URL scheme name (eg "http") instead of a prefix like "http://"
Packit ae9e2a
Packit ae9e2a
* `git_index_name_entrycount()` and `git_index_reuc_entrycount()` now
Packit ae9e2a
  return size_t instead of unsigned int.
Packit ae9e2a
Packit ae9e2a
* The `context_lines` and `interhunk_lines` fields in `git_diff`_options are
Packit ae9e2a
  now `uint32_t` instead of `uint16_t`. This allows to set them to `UINT_MAX`,
Packit ae9e2a
  in effect asking for "infinite" context e.g. to iterate over all the
Packit ae9e2a
  unmodified lines of a diff.
Packit ae9e2a
Packit ae9e2a
* `git_status_file()` now takes an exact path. Use `git_status_list_new()` if
Packit ae9e2a
  pathspec searching is needed.
Packit ae9e2a
Packit ae9e2a
* `git_note_create()` has changed the position of the notes reference
Packit ae9e2a
  name to match `git_note_remove()`.
Packit ae9e2a
Packit ae9e2a
* Rename `git_remote_load()` to `git_remote_lookup()` to bring it in line
Packit ae9e2a
  with the rest of the lookup functions.
Packit ae9e2a
Packit ae9e2a
* `git_remote_rename()` now takes the repository and the remote's
Packit ae9e2a
  current name. Accepting a remote indicates we want to change it,
Packit ae9e2a
  which we only did partially. It is much clearer if we accept a name
Packit ae9e2a
  and no loaded objects are changed.
Packit ae9e2a
Packit ae9e2a
* `git_remote_delete()` now accepts the repository and the remote's name
Packit ae9e2a
  instead of a loaded remote.
Packit ae9e2a
Packit ae9e2a
* `git_merge_head` is now `git_annotated_commit`, to better reflect its usage
Packit ae9e2a
  for multiple functions (including rebase)
Packit ae9e2a
Packit ae9e2a
* The `git_clone_options` struct no longer provides the `ignore_cert_errors` or
Packit ae9e2a
  `remote_name` members for remote customization.
Packit ae9e2a
Packit ae9e2a
  Instead, the `git_clone_options` struct has two new members, `remote_cb` and
Packit ae9e2a
  `remote_cb_payload`, which allow the caller to completely override the remote
Packit ae9e2a
  creation process. If needed, the caller can use this callback to give their
Packit ae9e2a
  remote a name other than the default (origin) or disable cert checking.
Packit ae9e2a
Packit ae9e2a
  The `remote_callbacks` member has been preserved for convenience, although it
Packit ae9e2a
  is not used when a remote creation callback is supplied.
Packit ae9e2a
Packit ae9e2a
* The `git_clone`_options struct now provides `repository_cb` and
Packit ae9e2a
  `repository_cb_payload` to allow the user to create a repository with
Packit ae9e2a
  custom options.
Packit ae9e2a
Packit ae9e2a
* The `git_push` struct to perform a push has been replaced with
Packit ae9e2a
  `git_remote_upload()`. The refspecs and options are passed as a
Packit ae9e2a
  function argument. `git_push_update_tips()` is now also
Packit ae9e2a
  `git_remote_update_tips()` and the callbacks are in the same struct as
Packit ae9e2a
  the rest.
Packit ae9e2a
Packit ae9e2a
* The `git_remote_set_transport()` function now sets a transport factory function,
Packit ae9e2a
  rather than a pre-existing transport instance.
Packit ae9e2a
Packit ae9e2a
* The `git_transport` structure definition has moved into the sys/transport.h
Packit ae9e2a
  file.
Packit ae9e2a
Packit ae9e2a
* libgit2 no longer automatically sets the OpenSSL locking
Packit ae9e2a
  functions. This is not something which we can know to do. A
Packit ae9e2a
  last-resort convenience function is provided in sys/openssl.h,
Packit ae9e2a
  `git_openssl_set_locking()` which can be used to set the locking.