forked from libgit2/libgit2
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge in upstream 1.8.4 #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cmbartschat
wants to merge
814
commits into
main
Choose a base branch
from
cbartschat-merged-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_diff_find_similar doesn't always remove unmodified deltas
ntlmclient: update to latest upstream ntlmclient
httpclient: clear client->parser.data after use
Let's use the latest & greatest for building our sanitizer / fuzzing builds.
Using modern rsa (sha2-256 or sha2-512) with libssh2 is complicated and depends on numerous factors for support. Just use ecdsa, which is supported by both libssh2 v1.11.0 and modern OpenSSH (which we use for our server in CI).
Yet more CI improvements
…n-push-example Support authentication in push example
Emulating `git commit` is clunky - identifying your commit's parents is part of the problem. Provide a helper to give you the parents given the current repository state.
There's been drift in our nightly builds vs our main builds. Unfortunately, sharing steps remains clunky with our matrix-heavy setup. So this remains copy-pasta.
When we update the build container, actually do a push. Remove the broken build-containers.yml step and just do it in the workflow.
Fix nightly builds
Commit improvements
Also fix indentation
docs: fix mistake in attr.h
Benchmarks: add a site to view results
Keep the `git_str` buf that prevents unnecessary small allocations, and simplify the comparisons compared to what was there previously.
Provide a helper method to provide the HEAD's commit, much like our existing `head_tree` helper.
commit functions should take an array of const pointers, not a const array.
examples: fix memory leak in for-each-ref.c
Promote mode to `uint32_t` before comparing it to an `uint16_t` to avoid mixed signed comparison warnings.
Avoid sloppy aliasing in our (re-)allocation, which is undefined behavior. This has been problematic before and was helped by `volatile` (see b62a6a1) but that is not technically correct, and some compilers / architectures do not understand that `ptr` is changing due to its aliasing. Just make `git_array_alloc` behave like `realloc`, taking a `void *` and returning a `void *`.
xdiff: use proper free function
rand: avoid uninitialized loadavg warnings
cli: include alloca on illumos / solaris / sunos
Update git_array allocator to obey strict aliasing rules
…ness tree: avoid mixed signedness comparison
Instead of tweaking the `stdalloc` allocator when `GIT_DEBUG_STRICT_ALLOC` is defined, actually create a debugging allocator. This allows us to ensure that we are strict about things like not expecting `malloc(0)` to do something useful, but we can also introduce an excessively pedantic `realloc` implementation that _always_ creates a new buffer, throws away its original `ptr`, and overwrites the data that's there with garbage. This may be helpful to identify places that make assumptions about realloc.
realpath(3) _may_ allocate strings (if the second param is NULL) using the system allocator. However, callers need an assurance that they can free memory using git__free. If we made realpath do an allocation, then make sure that we strdup it into our allocator's memory. More importantly, avoid this behavior by always providing a buffer to p_realpath invocations.
Instead of setting the allocator to stdalloc, just pass `NULL`, in case we're running with the debug allocator.
libgit2 v1.8.1
Introduce a stricter debugging allocator for testing
Description: In an older version of libgit2 in git_object_lookup_prefix was a check that repo is valid, but now there is repo->oid_type in the git_object_lookup and must be checked as well
Fixes a bug likely introduced in d396819 (in 1.8.1) whereby ‘proxy_settings.on_status’ would be left uninitialized when using the ‘http-parser’ backend, eventually leading to a segfault in ‘http_parser_execute’. Valgrind would report use of the uninitialized value like so: Conditional jump or move depends on uninitialised value(s) at 0x50CD533: http_parser_execute (http_parser.c:910) by 0x4928504: git_http_parser_execute (httpparser.c:82) by 0x4925C42: client_read_and_parse (httpclient.c:1178) by 0x4926F27: git_http_client_read_response (httpclient.c:1458) by 0x49255FE: http_stream_read (http.c:427) by 0x4929B90: git_smart__recv (smart.c:29) by 0x492C147: git_smart__store_refs (smart_protocol.c:58) by 0x4929F6C: git_smart__connect (smart.c:171) by 0x4904DCE: git_remote_connect_ext (remote.c:963) by 0x48A15D2: clone_into (clone.c:449) by 0x48A15D2: git__clone (clone.c:546) by 0x4010E9: main (libgit2-proxy.c:20)
Co-authored-by: Edward Thomson <[email protected]>
This reverts commit cf19ddc, which was breaking for several projects.
libgit2 v1.8.4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.