| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Monsters.
|
|
|
|
| |
Not all systems have poll(2); emulate it with select(2).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
We lose some error information from the read / write callbacks to
stransport. Store our own error value in the object so that we can
ensure that we rely upon it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
| |
Now that we've reduced the usage of GIT_THREADSTATE, remove it entirely
in favor of git_threadstate_get().
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Thread-local storage data may fail to initialize; in this case, do not
try to set the error message into it. When the thread state has not
been initialized, return a hardcoded message to that affect.
|
| |
|
|\
| |
| | |
Shallow (#6396) with some fixes from review
|
| |
| |
| |
| |
| | |
The `depth` field is suitable to specify unshallowing; provide an enum
to aide in specifying the `unshallow` value.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The semantics of `from_file` are weird - it looks like a function that
just opens a file, but it actually inspects the pointer, which is
unexpected and could make things very crashy.
Make an `open` function that just does an open, and move the magic to
`open_or_refresh` whose name better indicates that it may do weird
stuff.
|
| |
| |
| |
| |
| | |
Depth of `0` should indicate full depth. Disallow negative values (they
may have a future meaning) and use `0` as the default.
|
| | |
|
| |
| |
| |
| | |
Don't mix parsing by hand and using `git_parse` to parse.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use SHA256 for file checksums. SHA1 makes no sense as a default in 2023.
Given that we're just looking at a file checksum to see if it's changed,
this does not need to take repository's OID type into account or
otherwise be configurable.
|
| |
| |
| |
| | |
Looks like a double-free here.
|
| |
| |
| |
| | |
Teach the smart transport more about oid types, instead of assuming SHA1.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The opt mechanism isn't _really_ meant to be for feature flags, and it's
weird to feature flag shallow / unshallow at all.
|
| |\ |
|
| | |
| | |
| | | |
Co-authored-by: Qix <Qix-@users.noreply.github.com>
|
| |\ \
| | | |
| | | |
| | | | |
into shallow-clone-network
|
| | | |
| | | |
| | | | |
Co-authored-by: Qix <Qix-@users.noreply.github.com>
|
| |/ / |
|
| | | |
|
| |\ \ |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|