summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
* repo: understand the `objectformat` extensionEdward Thomson2022-12-031-0/+8
| | | | | | Teach the repository about the `objectformat` extension, supporting `sha1` always and `sha256` when the experimental sha256 support is active.
* cmake: provide empty experimental.h for non-cmake usersEdward Thomson2022-09-191-0/+20
| | | | | | | | Not everybody builds libgit2 using cmake; provide an `experimental.h` with no experiments configured for those that do not. To support this, we also now create compile definitions for experimental functionality, to supplant that empty `experimental.h`. cmake will continue to generate the proper `experimental.h` file for use with `make install`.
* sha256: indirection for experimental functionsEdward Thomson2022-07-133-0/+42
| | | | | The experimental function signature is only available when `GIT_EXPERIMENTAL_SHA256` is enabled.
* Merge pull request #6191 from libgit2/ethomson/sha256_pocEdward Thomson2022-07-137-45/+203
|\ | | | | RFC: SHA256 proof of concept
| * sha256: make sha256 an experimental optional featureEdward Thomson2022-06-202-19/+69
| | | | | | | | | | | | | | | | | | | | libgit2 can be built with optional, experimental sha256 support. This allows consumers to begin testing and providing feedback for our sha256 support while we continue to develop it, and allows us to make API breaking changes while we iterate on a final sha256 implementation. The results will be `git2-experimental.dll` and installed as `git2-experimental.h` to avoid confusion with a production libgit2.
| * odb_loose: SHA256 support for loose object storageEdward Thomson2022-06-201-2/+8
| | | | | | | | Teach the loose object database how to cope with SHA256 objects.
| * odb: add git_odb_loose_backend_optionsEdward Thomson2022-06-201-8/+38
| | | | | | | | Move the arguments to `git_odb_loose` into an options structure.
| * odb: accept an oid type in optionsEdward Thomson2022-06-202-0/+8
| | | | | | | | | | Allow the object database to take an oid type that it supports. This oid type will be used to validate the objects that the backends provide.
| * odb: add git_odb_optionsEdward Thomson2022-06-201-2/+20
| | | | | | | | | | Users will need to be able to specify the object id type for the given object database; add a new `git_odb_options` with that option.
| * odb_hash*: accept the oid type to hash intoEdward Thomson2022-06-201-7/+18
| | | | | | | | | | The git_odb_hash helper functions should not assume SHA1, and instead should be given the oid type that they're producing.
| * oid: specify a default implementationEdward Thomson2022-06-201-0/+3
| | | | | | | | libgit2's current default oid type is SHA1, set a public macro for that.
| * oid: add sha256 typed oidsEdward Thomson2022-06-201-4/+9
| |
| * oid: give oids a typeEdward Thomson2022-06-201-21/+36
| | | | | | | | | | `git_oid`s now have a type, and we require the oid type when creating the object id from creation functions.
| * oid: include maximum oid raw/hex sizesEdward Thomson2022-06-141-0/+2
| |
| * oid: introduce `git_oid_t`Edward Thomson2022-06-141-0/+5
| | | | | | | | | | | | We require an enumeration to help us identify the different types of object IDs. Currently, we only support SHA1 but we will support SHA256 in the future.
| * oid: define GIT_OID_SHA1_ZEROEdward Thomson2022-06-142-5/+10
| | | | | | | | | | Callers should not assume the layout of the oid structure; provide them a macro that defines the null / zero sha1 object id.
| * oid: `GIT_OID_*SZ` is now `GIT_OID_SHA1_*SIZE`Edward Thomson2022-06-144-9/+9
| | | | | | | | | | In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
* | meta: update version number to v1.6.0-alphaEdward Thomson2022-07-131-4/+4
| |
* | v1.5: update version numbersEdward Thomson2022-07-131-2/+2
|/
* status: update documentation for default optionsEdward Thomson2022-06-131-2/+5
|
* config: update config entry iteration lifecycleEdward Thomson2022-06-131-2/+2
|
* transport: remove `git_transport_smart_proxy_options` Edward Thomson2022-06-121-10/+0
| | | Snuck in during refactoring; let's get rid of it.
* Merge remote-tracking branch 'origin/main' into mainlhchavez2022-06-113-7/+7
|\
| * docs: fix couple of typosAleksey Kulikov2022-04-283-7/+7
| |
| * Merge pull request #6277 from cschlack/sys_transport_missing_includeEdward Thomson2022-04-251-0/+1
| |\ | | | | | | Fix missing include
| | * Fix missing includeChristian Schlack2022-04-161-0/+1
| | |
| * | remote: Delete a now-inexistent API declarationlhchavez2022-04-141-10/+0
| |/ | | | | | | | | | | | | | | | | | | 6fc6eeb66c40310086c8f059cae41de69ad4c6da replaced the remote options with `git_remote_connect_options`. The function definitions were removed, but one function declaration remained, causing linker errors if one tried to use it. This change removes the declaration of `git_transport_smart_proxy_option` to better reflect reality.
* | Apply suggestions from code reviewlhchavez2022-06-112-1/+3
| | | | | | Co-authored-by: Edward Thomson <ethomson@github.com>
* | transport: introduce `git_transport_smart_remote_connect_options`lhchavez2022-04-162-2/+29
|/ | | | | | | | | | | 6fc6eeb66c40310086c8f059cae41de69ad4c6da removed `git_transport_smart_proxy_option`, and there was nothing added to replace it. That made it hard for custom transports / smart subtransports to know what remote connect options to use (e.g. proxy options). This change introduces `git_transport_smart_remote_connect_options` to replace it.
* repo: make ownership checks optionalEdward Thomson2022-04-111-1/+11
| | | | | Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can disable repository ownership validation.
* repo: ensure that repo dir is owned by current userEdward Thomson2022-04-111-1/+2
| | | | | | Ensure that the repository directory is owned by the current user; this prevents us from opening configuration files that may have been created by an attacker.
* sha: GIT_ERROR_SHA1 is deprecated in favor of GIT_ERROR_SHAEdward Thomson2022-03-232-1/+3
| | | | The more generic GIT_ERROR_SHA allows for SHA256 errors as well as SHA1.
* errors: expose `git_error_set`Edward Thomson2022-02-221-2/+16
| | | | | The `git_error_set` function is useful for callers who implement backends and advanced callbacks. Expose it.
* meta: document version information for libgit2Edward Thomson2022-02-141-0/+20
|
* meta: provide an accessor for prerelease infoEdward Thomson2022-02-141-0/+11
|
* meta: update version number to v1.5.0-alphaEdward Thomson2022-02-141-6/+7
| | | | | | | | | | Update the version number in main to v1.5.0-alpha. This helps people understand that the main builds are not part of the v1.4.0 release train. We use "alpha" to indicate builds out of main (or nightlies) as semver v2 requires the prerelease component is compared lexicographically. Thus, our "beta" and "rc" releases should follow.
* v1.4: update version numbersEdward Thomson2022-02-131-3/+3
|
* Merge pull request #6204 from boretrk/merge_flagsEdward Thomson2022-02-121-2/+17
|\ | | | | merge: fix overlap between GIT_MERGE_FILE_FAVOR__CONFLICTED and GIT_MERGE_FILE_SIMPLIFY_ALNUM
| * merge: make the internal flags publicEdward Thomson2022-02-121-4/+13
| | | | | | | | | | | | | | | | | | | | | | We made the flags that enable recursive merge internal, on the assumption that nobody would want them and they're hard to reason about. (Giving people an option that nobody wants is just extra noise.) However, it made it hard for _us_ to reason about. There's no good reason to keep it private, let's just make it public and push that cognitive load onto our poor users. But they should expect it, they're dealing with git, after all.
| * merge: allocate merge flags for internal usePeter Pettersson2022-02-071-2/+8
| | | | | | | | | | Allocate flags in git_merge_flag_t and git_merge_file_flag_t for internal usage to prevent accidental double allocation.
* | diff: indicate when the file size is "valid"Edward Thomson2022-02-121-1/+2
| | | | | | | | | | | | | | | | When we know the file size (because we're producing it from a working directory iterator, or an index with an up-to-date cache) then set a flag indicating as such. This removes the ambiguity about a 0 file size, which could indicate that a file exists and is 0 bytes, or that we haven't read it yet.
* | Merge pull request #6203 from libgit2/ethomson/fetch_by_oidEdward Thomson2022-02-112-0/+41
|\ \ | |/ |/| Fetch by object id
| * transport: transports can indicate support for fetch by oidEdward Thomson2022-02-061-0/+31
| |
| * transport: add capabilities query functionEdward Thomson2022-02-061-0/+10
| |
* | Merge pull request #6192 from libgit2/ethomson/sha256_preparationEdward Thomson2022-02-063-7/+38
|\ \ | |/ |/| SHA256: early preparation
| * packbuilder: use the packfile name instead of hashEdward Thomson2022-01-271-7/+21
| | | | | | | | | | Deprecate the `git_packfile_hash` function. Callers should use the new `git_packfile_name` function which provides a unique packfile name.
| * indexer: use a byte array for checksumEdward Thomson2022-01-271-0/+14
| | | | | | | | | | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_indexer_hash` function. Callers should use the new `git_indexer_name` function which provides a unique packfile name.
| * index: use a byte array for checksumEdward Thomson2022-01-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_index_checksum` function without a replacement. This is an abstraction that callers should not care about (and indeed do not seem to be using). Remove the unused `git_index__changed_relative_to` function.
* | merge: support zdiff3 conflict stylesEdward Thomson2022-01-302-2/+8
|/
* Merge pull request #6168 from punkymaniac/patch-documentation-2Edward Thomson2022-01-1732-9/+144
|\ | | | | Improve documentation