summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* worktree: document that is_prunable sets error messagesEdward Thomson2023-05-161-1/+3
| | | | | When a worktree is not prunable, an error message will be set with information about why. Document that.
* streams: sockets are non-blocking and can timeoutEdward Thomson2023-05-133-4/+44
| | | | | | | | | | | | | | | Make socket I/O non-blocking and add optional timeouts. Users may now set `GIT_OPT_SET_SERVER_CONNECT_TIMEOUT` to set a shorter connection timeout. (The connect timeout cannot be longer than the operating system default.) Users may also now configure the socket read and write timeouts with `GIT_OPT_SET_SERVER_TIMEOUT`. By default, connects still timeout based on the operating system defaults (typically 75 seconds) and socket read and writes block. Add a test against our custom testing git server that ensures that we can timeout reads against a slow server.
* oid: don't assume thread local state was initializedEdward Thomson2023-05-131-1/+1
| | | | | | git_oid_tostr_s could fail if thread-local state initialization fails. In that case, it will now return `NULL`. Callers should check for `NULL` and propagate the failure.
* Merge pull request #6557 from libgit2/ethomson/shallowEdward Thomson2023-05-093-3/+39
|\ | | | | Shallow (#6396) with some fixes from review
| * fetch: remove `unshallow` optionEdward Thomson2023-05-091-9/+13
| | | | | | | | | | The `depth` field is suitable to specify unshallowing; provide an enum to aide in specifying the `unshallow` value.
| * oid: use an oid array instead of shallowarrayEdward Thomson2023-05-091-9/+13
| | | | | | | | | | | | Users should provide us an array of object ids; we don't need a separate type. And especially, we should not be mutating user-providing values. Instead, use `git_oid *` in the shallow code.
| * shallow: don't default to -1 for depthEdward Thomson2023-05-081-3/+3
| | | | | | | | | | Depth of `0` should indicate full depth. Disallow negative values (they may have a future meaning) and use `0` as the default.
| * shallow: remove feature flagEdward Thomson2023-04-241-5/+1
| | | | | | | | | | The opt mechanism isn't _really_ meant to be for feature flags, and it's weird to feature flag shallow / unshallow at all.
| * Merge remote-tracking branch 'origin/main' into shallow-clone-networkEdward Thomson2023-04-225-11/+72
| |\
| * | Remove unnecessary include.lmcglash2023-03-131-1/+0
| | |
| * | Merge branch 'shallow-clone-network' of https://github.com/mathworks/libgit2 ↵lmcglash2023-03-101-2/+2
| |\ \ | | | | | | | | | | | | into shallow-clone-network
| | * | Apply suggestions from code reviewLaurence McGlashan2023-03-101-2/+2
| | | | | | | | | | | | Co-authored-by: Qix <Qix-@users.noreply.github.com>
| * | | Remove unused git_transport_flags_tlmcglash2023-03-101-9/+0
| |/ /
| * | Merge commit 'd066d0d95c43e97df6624292f3f527f9372ca8fe'lmcglash2023-03-1010-39/+238
| |\ \
| * | | remove unused apiyuangli2022-08-112-12/+1
| | | |
| * | | support fetch unshallow option on shallow reposyuangli2022-08-091-1/+8
| | | |
| * | | refactor git_fetch_option.depth and usageyuangli2022-08-021-1/+3
| | | |
| * | | remove build errorsyuangli2022-07-292-6/+7
| | | |
| * | | Merge branch 'transportPR' into shallow-clone-networkyuangli2022-07-293-3/+41
| |\ \ \
| | * | | Merge branch 'pr/tiennou/4747' into transportPRyuangli2022-07-043-3/+32
| | | | |
| * | | | Merge branch 'mw_dev' into shallow-clone-localYuang Li2022-07-299-37/+238
| |\ \ \ \
| * | | | | improve error handlingyuangli2022-07-281-1/+0
| | | | | |
| * | | | | fix build errorsyuangli2022-07-261-1/+1
| | | | | |
| * | | | | Merge branch 'pr/pks-t/5254' into shallow-clone-localyuangli2022-07-263-1/+7
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | add feature flag for shallow clone supportYuang Li2022-06-271-1/+5
| | | | | |
| | * | | | Merge branch 'main' into pr/pks-t/5254Yuang Li2022-06-2446-461/+1772
| | |\ \ \ \
| | * | | | | repository: do not expose grafting mechanismPatrick Steinhardt2020-06-271-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we expose the function `git_repository_shallow_roots` to get all grafted roots of the repository. This already paints us into a corner, though, as we certainly need to experiment with some functionality of the grafting mechanism before we can happily expose some of its functionality. Most importantly, we need to get right when to refresh grafts and when not. Thus, this commit removes the public function with no public replacement. We should first try and see what usecases people come up with to e.g. expose the `git_grafts` mechanism directly in the future or do something different altogether. Instead, we provide an internal interface to get weak pointers to the grafting structs part of the repository itself.
| | * | | | | repository: reuse grafts for shallow rootsPatrick Steinhardt2020-06-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shallow roots are in fact another user of the grafting mechanism, and in essence they do use the same file format for grafted commits. Thus, instead of hand-coding the parsing logic a second time, we can just reuse the `git_grafts` structure for shallow commits, as well.
| | * | | | | grafts: move parsing into grafts modulePatrick Steinhardt2020-06-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of grafts files is currently contained in the repository code. To make grafts-related logic more self-contained, move it into "grafts.c" instead.
| | * | | | | repo: load shallow rootsEtienne Samson2020-06-271-0/+12
| | | | | | |
* | | | | | | sha256: wrap_odb supports SHA256Edward Thomson2023-05-061-2/+12
| |_|_|_|_|/ |/| | | | |
* | | | | | Merge pull request #6549 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-04-224-6/+67
|\ \ \ \ \ \ | | | | | | | | | | | | | | sha256: less hardcoded SHA1 types and lengths
| * | | | | | commit graph: support sha256Edward Thomson2023-04-101-2/+12
| | | | | | |
| * | | | | | midx: support sha256Edward Thomson2023-04-101-1/+5
| | | | | | |
| * | | | | | diff: parse patches with sha256Edward Thomson2023-04-101-3/+41
| | | | | | |
| * | | | | | index: add sha256 supportEdward Thomson2023-04-101-0/+9
| | | | | | |
* | | | | | | meta: the main branch is now v1.7.0Edward Thomson2023-04-121-5/+5
|/ / / / / /
* | | | | | v1.6.3: update version numbersEdward Thomson2023-03-211-2/+2
| |_|_|_|/ |/| | | |
* | | | | v1.6.2: update version numbersEdward Thomson2023-02-281-2/+2
| | | | |
* | | | | v1.6.1: correct missing version number updatesv1.6.1Edward Thomson2023-02-251-2/+2
| | | | |
* | | | | v1.6: update version numbersEdward Thomson2023-02-241-2/+2
| | | | |
* | | | | Correct the definition of "empty" in the docs for `git_repository_is_empty`Tim Rogers2023-02-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the documentation for `git_repository_is_empty` which currently does not accurately describe libgit2's definition of "empty". It says that HEAD must point to the "unborn master branch", when in fact, this is not the case if the repo's `init.defaultBranch` configuration is set. If it is set, it will check that HEAD points there. Only if it is not set does it fall back to `master`.
* | | | | odb: don't unconditionally add oid_type to streamEdward Thomson2023-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git_odb_stream` should have an `oid_type` to disambiguate; that's not necessary on non-experimental SHA256 builds. Avoid unnecessary ABI breakage for consumers and hide it behind an ifdef for now.
* | | | | Merge pull request #6330 from gitkraken-jacobw/partial-stashingEdward Thomson2023-02-161-6/+60
|\ \ \ \ \ | | | | | | | | | | | | stash: partial stash specific files
| * | | | | stash: fixes from code reviewEdward Thomson2023-02-161-17/+5
| | | | | |
| * | | | | stash: add `const` to argumentsJacob Watson2022-07-141-1/+3
| | | | | |
| * | | | | stash: implement partial stashing by pathJacob Watson2022-07-141-1/+65
| | |_|_|/ | |/| | |
* | | | | strarray: remove deprecated declarationEdward Thomson2023-02-161-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git_strarray_copy` is deprecated (and has been included in `deprecated.h` for some time). It should not have remained in the public `strarray.h`. Remove it.
* | | | | Merge pull request #6456 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-02-145-16/+138
|\ \ \ \ \ | | | | | | | | | | | | SHA256: more SHA256 support
| * | | | | repo: take an oid_type when initializingEdward Thomson2023-02-121-0/+9
| | | | | |