Skip to content
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

Cbartschat merge2 #45

Open
wants to merge 822 commits into
base: main
Choose a base branch
from
Open

Cbartschat merge2 #45

wants to merge 822 commits into from

Conversation

cmbartschat
Copy link

No description provided.

ethomson and others added 30 commits December 21, 2023 21:33
…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.
Also fix indentation
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.
Provide a simple helper method that allows users to create a commit from
the current index with minimal information.
When merging trees containing multiple empty files, make sure a rename
is not detected between each empty files.

For example
Ancestor has files:
 * foo.c with content
 * bar.c empty

Ours has:
 * foo.c with content
 * boo.c empty

Theirs has:
 * foo.c with other content
 * bar.c with content

merge_trees() will incorrectly apply the content of theirs's 'bar.c' in
ours's boo.c' thinking 'bar.c' has been renamed to 'boo.c'.
This happens because both are empty and their sha1 are the same. Thus
merge_diff_mark_similarity_exact() incorrectly mark it as renamed.

Signed-off-by: Gregory Herrero <[email protected]>
Add a boolean option to merge_trivial() so that it can use theirs
parent instead of merge base as ancestor. This will be needed in the
following commit.

Signed-off-by: Gregory Herrero <[email protected]>
This test follow "merge: fix incorrect rename detection for empty
files." commit.

Signed-off-by: Gregory Herrero <[email protected]>
Renaming a section or deleting its content removes each entry after
copying it in its new place if needed. However, since each entry
may be part of a multivar, deletion must only remove the exact entry
that has just been copied.
commit: introduce git_commit_create_from_stage
ethomson and others added 30 commits May 13, 2024 11:29
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.
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)
This reverts commit cf19ddc, which
was breaking for several projects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.