- 30 Aug, 2023 2 commits
-
-
Provide more user-friendly error messages in smart protocol negotiation failures.
Edward Thomson committed -
Instead of "early EOF", provide information on _when_ we're seeing the EOF for debugging.
Edward Thomson committed
-
- 13 May, 2023 2 commits
-
-
The `gitno` buffer interface is another layer on top of socket reads. Abstract it a bit into a "static string" that has `git_str` like semantics but without heap allocation which moves the actual reading logic into the socket / stream code, and allows for easier future usage of a static / stack-allocated `git_str`-like interface.
Edward Thomson committed -
`git__timer` is now `git_time_monotonic`, and returns milliseconds since an arbitrary epoch. Using a floating point to store the number of seconds elapsed was clever, as it better supports the wide range of precision from the different monotonic clocks of different systems. But we're a version control system, not a real-time clock. Milliseconds is a good enough precision for our work _and_ it's the units that system calls like `poll` take and that our users interact with. Make `git_time_monotonic` return the monotonically increasing number of milliseconds "ticked" since some arbitrary epoch.
Edward Thomson committed
-
- 09 May, 2023 1 commit
-
-
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.
Edward Thomson committed
-
- 08 May, 2023 1 commit
-
-
Looks like a double-free here.
Edward Thomson committed
-
- 25 Apr, 2023 1 commit
-
-
Teach the smart transport more about oid types, instead of assuming SHA1.
Edward Thomson committed
-
- 10 Mar, 2023 1 commit
-
-
Co-authored-by: Qix <Qix-@users.noreply.github.com>
Laurence McGlashan committed
-
- 12 Feb, 2023 2 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
- 25 Nov, 2022 1 commit
-
-
This looks like a typo to me, from what i can see these lines were added at the same time and because of how capabilities are calculated, it's likely that this code will work in situations where these capabilities were the last ones.
Russell Sim committed
-
- 01 Aug, 2022 1 commit
-
-
yuangli committed
-
- 29 Jul, 2022 1 commit
-
-
yuangli committed
-
- 15 Jun, 2022 1 commit
-
-
In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
Edward Thomson committed
-
- 23 Feb, 2022 1 commit
-
-
Edward Thomson committed
-
- 08 Feb, 2022 1 commit
-
-
Colin Stolley committed
-
- 07 Feb, 2022 1 commit
-
-
For large pushes, preparing the pack can take a while. Currently we send the pack header first, followed by preparing the pack and then finally sending the pack. Unfortunately github.com will terminate a git-receive-pack command over http if it is idle for more than 10 seconds. This is easily exceeded for a large push, and so the push is rejected with a Broken Pipe error. This patch moves the pack preparation ahead of sending the pack header, so that the timeout is avoided. prepare_pack() can be called multiple times but will only do the work once, so the original PREPARE_PACK call inside git_packbuilder_foreach() remains.
Colin Stolley committed
-
- 06 Feb, 2022 1 commit
-
-
Edward Thomson committed
-
- 30 Jan, 2022 1 commit
-
-
Peter Pettersson committed
-
- 06 Jan, 2022 1 commit
-
-
The existing mechanism for providing options to remote fetch/push calls, and subsequently to transports, is unsatisfactory. It requires an options structure to avoid breaking the API and callback signatures. 1. Introduce `git_remote_connect_options` to satisfy those needs. 2. Add a new remote connection API, `git_remote_connect_ext` that will take this new options structure. Existing `git_remote_connect` calls will proxy to that. `git_remote_fetch` and `git_remote_push` will proxy their fetch/push options to that as well. 3. Define the interaction between `git_remote_connect` and fetch/push. Connect _may_ be called before fetch/push, but _need not_ be. The semantics of which options would be used for these operations was not specified if you specify options for both connect _and_ fetch. Now these are defined that the fetch or push options will be used _if_ they were specified. Otherwise, the connect options will be used if they were specified. Otherwise, the library's defaults will be used. 4. Update the transports to understand `git_remote_connect_options`. This is a breaking change to the systems API.
Edward Thomson committed
-
- 05 Jan, 2022 1 commit
-
-
Dimitris Apostolou committed
-
- 17 Oct, 2021 1 commit
-
-
libgit2 has two distinct requirements that were previously solved by `git_buf`. We require: 1. A general purpose string class that provides a number of utility APIs for manipulating data (eg, concatenating, truncating, etc). 2. A structure that we can use to return strings to callers that they can take ownership of. By using a single class (`git_buf`) for both of these purposes, we have confused the API to the point that refactorings are difficult and reasoning about correctness is also difficult. Move the utility class `git_buf` to be called `git_str`: this represents its general purpose, as an internal string buffer class. The name also is an homage to Junio Hamano ("gitstr"). The public API remains `git_buf`, and has a much smaller footprint. It is generally only used as an "out" param with strict requirements that follow the documentation. (Exceptions exist for some legacy APIs to avoid breaking callers unnecessarily.) Utility functions exist to convert a user-specified `git_buf` to a `git_str` so that we can call internal functions, then converting it back again.
Edward Thomson committed
-
- 15 Jul, 2021 1 commit
-
-
Makes usage of CLOCK_MONOTONIC conditional and makes functions that uses git__timer handle clock resynchronization. Call gettimeofday with tzp set to NULL as required by https://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html
Peter Pettersson committed
-
- 06 Dec, 2020 1 commit
-
-
Clarify the `git_atomic` type and functions now that we have a 64 bit version as well (`git_atomic64`).
Edward Thomson committed
-
- 27 Nov, 2020 1 commit
-
-
Edward Thomson committed
-
- 24 Jan, 2020 1 commit
-
-
Edward Thomson committed
-
- 23 Aug, 2019 1 commit
-
-
Etienne Samson committed
-
- 21 Aug, 2019 1 commit
-
-
The code worked under the assumption that anything under `refs/tags` are tag objects, and all the rest would be peelable to a commit. As it is completely valid to have tags to blobs under a non `refs/tags` ref, this would cause failures when trying to peel a tag to a commit. Fix the broken filtering by switching to `git_revwalk_push_glob`, which already handles this case.
Etienne Samson committed
-
- 24 Jun, 2019 1 commit
-
-
Ensure that the server has not sent us overly-large sideband messages (ensure that they are no more than `INT_MAX` bytes), then cast to `int`.
Edward Thomson committed
-
- 15 Jun, 2019 1 commit
-
-
The only function that is named `issomething` (without underscore) was `git_oid_iszero`. Rename it to `git_oid_is_zero` for consistency with the rest of the library.
Edward Thomson committed
-
- 22 Feb, 2019 2 commits
-
-
The `git_push_transfer_progress` is a callback and as such should be suffixed with `_cb` for consistency. Rename `git_push_transfer_progress` to `git_push_transfer_progress_cb`.
Edward Thomson committed -
Update internal usage of `git_transfer_progress` to `git_indexer_progreses`.
Edward Thomson committed
-
- 22 Jan, 2019 1 commit
-
-
Move to the `git_error` name in the internal API for error-related functions.
Edward Thomson committed
-
- 17 Jan, 2019 1 commit
-
-
Update internal usage to use the `git_reference` names for constants.
Edward Thomson committed
-
- 03 Oct, 2018 1 commit
-
-
The parameters of the `git_pkt_parse_line` function are quite confusing. First, there is no real indicator what the `out` parameter is actually all about, and it's not really clear what the `bufflen` parameter refers to. Reorder and rename the parameters to make this more obvious.
Patrick Steinhardt committed
-
- 06 Jul, 2018 1 commit
-
-
By clarifying what detect_caps returns on empty/missing packet, we can be sure there are actually refs to process. The old code could blindly dereference `first`, which might have been NULL. Reported by Coverity, CID 1393614
Etienne Samson committed
-
- 29 Jun, 2018 2 commits
-
-
Nelson Elhage committed
-
Since commit 630a6736 (refspec: add public parsing api, 2018-02-07), we now have two functions `git_refspec_free` and `git_refspec__free`. The difference is that the first one will free the structure itself, while the second one will only free the structure's contents. Use our new `dispose` naming pattern for the latter function to help avoid confusion.
Patrick Steinhardt committed
-
- 26 Jun, 2018 1 commit
-
-
Edward Thomson committed
-
- 25 Jun, 2018 1 commit
-
-
Nelson Elhage committed
-