libgit2/github.git
10 months agourl: ensure minimum components for formattingmaint/v1.2v1.2.0
Edward Thomson [Thu, 2 Sep 2021 03:06:19 +0000 (1 23:06 -0400)]
url: ensure minimum components for formatting

10 months agourl: ensure minimum components for formatting
Edward Thomson [Thu, 2 Sep 2021 02:49:14 +0000 (1 22:49 -0400)]
url: ensure minimum components for formatting

10 months agoMerge pull request #6026 from libgit2/ethomson/proxy
Edward Thomson [Thu, 2 Sep 2021 01:57:16 +0000 (1 21:57 -0400)]
Merge pull request #6026 from libgit2/ethomson/proxy

Update proxy configuration

10 months agoremote: refactor proxy detection
Edward Thomson [Thu, 2 Sep 2021 00:34:28 +0000 (1 20:34 -0400)]
remote: refactor proxy detection

Update the proxy detection for a remote.

1. Honor `http.<url>.proxy` syntax for a remote's direct URL and
   parent URLs.
2. Honor an empty configuration URL to override a proxy configuration.

Add tests to ensure that configuration specificity is honored.

10 months agourl: introduce `git_net_url_dup`
Edward Thomson [Thu, 2 Sep 2021 00:30:59 +0000 (1 20:30 -0400)]
url: introduce `git_net_url_dup`

10 months agourl: introduce `git_net_url_matches_pattern_list`
Edward Thomson [Wed, 1 Sep 2021 02:01:34 +0000 (31 22:01 -0400)]
url: introduce `git_net_url_matches_pattern_list`

Provide a utility method on a url to determine if it matches any pattern
in a comma-separated list, similar to what one would find in `NO_PROXY`
environment variables.

10 months agourl: introduce `git_net_url_matches_pattern`
Edward Thomson [Wed, 1 Sep 2021 00:41:45 +0000 (31 20:41 -0400)]
url: introduce `git_net_url_matches_pattern`

Provide a method to determine if a given URL matches a host:port pattern
like the ones found in `NO_PROXY` environment variables.

10 months agotests: create the network::url test hierarcy
Edward Thomson [Tue, 31 Aug 2021 13:41:14 +0000 (31 09:41 -0400)]
tests: create the network::url test hierarcy

10 months agoutil: introduce `git__strlcmp`
Edward Thomson [Tue, 31 Aug 2021 19:22:44 +0000 (31 15:22 -0400)]
util: introduce `git__strlcmp`

Introduce a utility function that compares a NUL terminated string to a
possibly not-NUL terminated string with length.  This is similar to
`strncmp` but with an added check to ensure that the lengths match (not
just the `size` portion of the two strings).

10 months agoAdd NO_PROXY env support
Mathieu Parent [Thu, 11 Feb 2021 21:53:16 +0000 (11 22:53 +0100)]
Add NO_PROXY env support

Item 2 of 3 from #4164

Signed-off-by: Mathieu Parent <math.parent@gmail.com>
10 months agoMerge pull request #6024 from lhchavez/fix-possible-null-pointer-dereference
Edward Thomson [Tue, 31 Aug 2021 13:21:22 +0000 (31 09:21 -0400)]
Merge pull request #6024 from lhchavez/fix-possible-null-pointer-dereference

Fix a possible null pointer dereference

10 months agoFix a possible null pointer dereference
lhchavez [Tue, 31 Aug 2021 12:23:20 +0000 (31 05:23 -0700)]
Fix a possible null pointer dereference

This change fixes a possible null pointer dereference if anything inside
`git_commit_graph_writer_add_index_file` fails before the packfile being
valid.

https://scan6.coverity.com/reports.htm#v52218/p10377/fileInstanceId=122935896&defectInstanceId=32525576&mergedDefectId=1461634

10 months agov1.2: update version information
Edward Thomson [Tue, 31 Aug 2021 04:13:42 +0000 (31 00:13 -0400)]
v1.2: update version information

10 months agov1.2: changelog
Edward Thomson [Tue, 31 Aug 2021 04:11:56 +0000 (31 00:11 -0400)]
v1.2: changelog

10 months agoMerge pull request #5943 from kcsaul/fix/5851
Edward Thomson [Tue, 31 Aug 2021 03:10:24 +0000 (30 23:10 -0400)]
Merge pull request #5943 from kcsaul/fix/5851

Fix worktree iteration when repository has no common directory

10 months agoMerge pull request #6022 from lollipopman/connect-proxy-host-header
Edward Thomson [Mon, 30 Aug 2021 22:20:35 +0000 (30 18:20 -0400)]
Merge pull request #6022 from lollipopman/connect-proxy-host-header

Set Host Header to match CONNECT authority target

10 months agoMerge branch 'cgraph-write' into main
Edward Thomson [Mon, 30 Aug 2021 21:55:47 +0000 (30 17:55 -0400)]
Merge branch 'cgraph-write' into main

10 months agocommit graph: formatting fixes
Edward Thomson [Mon, 30 Aug 2021 21:55:13 +0000 (30 17:55 -0400)]
commit graph: formatting fixes

10 months agoSet Host Header to match CONNECT authority target
Jesse Hathaway [Mon, 30 Aug 2021 21:24:54 +0000 (30 21:24 +0000)]
Set Host Header to match CONNECT authority target

Prior to this change, for CONNECT requests, the Host header was set to
the host and port of the target http proxy. However, per the rfc7230 for
HTTP/1.1 this is incorrect as the Host header should match the target of
the CONNECT request, as detailed in section 5.3.3 & 5.4.

  5.3.3.  authority-form

   The authority-form of request-target is only used for CONNECT
   requests (Section 4.3.6 of [RFC7231]).

     authority-form = authority

   When making a CONNECT request to establish a tunnel through one or
   more proxies, a client MUST send only the target URI's authority
   component (excluding any userinfo and its "@" delimiter) as the
   request-target.  For example,

     CONNECT www.example.com:80 HTTP/1.1

  5.4.  Host

   <snip>

   A client MUST send a Host header field in all HTTP/1.1 request
   messages.  If the target URI includes an authority component, then a
   client MUST send a field-value for Host that is identical to that
   authority component, excluding any userinfo subcomponent and its "@"
   delimiter (Section 2.7.1).  If the authority component is missing or
   undefined for the target URI, then a client MUST send a Host header
   field with an empty field-value.

This issue was noticed when proxying requests through HAProxy 2.2 which
rejects these invalid http requests.

10 months agoMerge pull request #6018 from libgit2/ethomson/fixups
Edward Thomson [Mon, 30 Aug 2021 13:24:48 +0000 (30 09:24 -0400)]
Merge pull request #6018 from libgit2/ethomson/fixups

Fixes from code analysis

10 months agodate: promote before multiply
Edward Thomson [Mon, 30 Aug 2021 13:02:26 +0000 (30 09:02 -0400)]
date: promote before multiply

10 months agofilter: don't overwrite error value
Edward Thomson [Mon, 30 Aug 2021 12:49:00 +0000 (30 08:49 -0400)]
filter: don't overwrite error value

10 months agohashsig: close fd on error
Edward Thomson [Mon, 30 Aug 2021 12:47:04 +0000 (30 08:47 -0400)]
hashsig: close fd on error

10 months agoerror: don't check string after assert
Edward Thomson [Mon, 30 Aug 2021 12:40:26 +0000 (30 08:40 -0400)]
error: don't check string after assert

10 months agopack: don't assert in the lock
Edward Thomson [Mon, 30 Aug 2021 12:31:50 +0000 (30 08:31 -0400)]
pack: don't assert in the lock

10 months agomidx: return an error when detected
Edward Thomson [Mon, 30 Aug 2021 12:28:56 +0000 (30 08:28 -0400)]
midx: return an error when detected

10 months agohttpclient: actually return `GIT_EAUTH`
Edward Thomson [Mon, 30 Aug 2021 12:27:27 +0000 (30 08:27 -0400)]
httpclient: actually return `GIT_EAUTH`

10 months agoMerge pull request #6017 from libgit2/ethomson/buf_is_readonly
Edward Thomson [Mon, 30 Aug 2021 02:54:01 +0000 (29 22:54 -0400)]
Merge pull request #6017 from libgit2/ethomson/buf_is_readonly

buf: deprecate public git_buf writing functions

10 months agoMerge pull request #6011 from libgit2/ethomson/filter_apply
Edward Thomson [Mon, 30 Aug 2021 02:53:49 +0000 (29 22:53 -0400)]
Merge pull request #6011 from libgit2/ethomson/filter_apply

filter: filter drivers stop taking git_buf as user input

10 months agoMerge pull request #6016 from libgit2/ethomson/commit_create_cb
Edward Thomson [Mon, 30 Aug 2021 02:53:38 +0000 (29 22:53 -0400)]
Merge pull request #6016 from libgit2/ethomson/commit_create_cb

Introduce `create_commit_cb`, deprecate `signing_cb`

10 months agoMerge pull request #6012 from libgit2/ethomson/custom_url
Edward Thomson [Mon, 30 Aug 2021 02:53:28 +0000 (29 22:53 -0400)]
Merge pull request #6012 from libgit2/ethomson/custom_url

remote: introduce remote_ready_cb, deprecate resolve_url callback

10 months agoMerge pull request #6009 from libgit2/ethomson/custom_cert_locations
Edward Thomson [Mon, 30 Aug 2021 02:34:19 +0000 (29 22:34 -0400)]
Merge pull request #6009 from libgit2/ethomson/custom_cert_locations

opts: test GIT_OPT_SET_SSL_CERT_LOCATIONS

10 months agombedTLS: Fix setting certificate directory
Zachary Michaels [Wed, 25 Aug 2021 00:37:15 +0000 (24 17:37 -0700)]
mbedTLS: Fix setting certificate directory

fixes #6003

10 months agoopts: test GIT_OPT_SET_SSL_CERT_LOCATIONS
Edward Thomson [Wed, 25 Aug 2021 22:01:34 +0000 (25 18:01 -0400)]
opts: test GIT_OPT_SET_SSL_CERT_LOCATIONS

Include a self-signed certificate for test.libgit2.org:1443 that we can
use to verify that GIT_OPT_SET_SSL_CERT_LOCATIONS works.

10 months agoMerge remote-tracking branch 'origin/main' into cgraph-write
lhchavez [Mon, 30 Aug 2021 01:50:49 +0000 (29 18:50 -0700)]
Merge remote-tracking branch 'origin/main' into cgraph-write

10 months agoMerge pull request #5841 from J0Nes90/features/checkout-dry-run
Edward Thomson [Mon, 30 Aug 2021 01:49:33 +0000 (29 21:49 -0400)]
Merge pull request #5841 from J0Nes90/features/checkout-dry-run

Checkout dry-run

10 months agoUpdate include/git2/checkout.h
Edward Thomson [Mon, 30 Aug 2021 01:49:26 +0000 (29 21:49 -0400)]
Update include/git2/checkout.h

10 months agoMerge pull request #5405 from lhchavez/multi-pack-index-odb-write
Edward Thomson [Mon, 30 Aug 2021 01:40:26 +0000 (29 21:40 -0400)]
Merge pull request #5405 from lhchavez/multi-pack-index-odb-write

midx: Introduce git_odb_write_multi_pack_index()

10 months agoMerge pull request #5395 from josharian/http-use-eauth
Edward Thomson [Mon, 30 Aug 2021 01:40:16 +0000 (29 21:40 -0400)]
Merge pull request #5395 from josharian/http-use-eauth

Use error code GIT_EAUTH for authentication failures

10 months agoMerge branch 'main' into multi-pack-index-odb-write
Edward Thomson [Mon, 30 Aug 2021 01:35:40 +0000 (29 21:35 -0400)]
Merge branch 'main' into multi-pack-index-odb-write

10 months agoMerge pull request #5404 from lhchavez/multi-pack-index-write
Edward Thomson [Mon, 30 Aug 2021 01:30:51 +0000 (29 21:30 -0400)]
Merge pull request #5404 from lhchavez/multi-pack-index-write

midx: Add a way to write multi-pack-index files

10 months agoMerge branch 'main' into http-use-eauth
Edward Thomson [Mon, 30 Aug 2021 01:29:14 +0000 (29 21:29 -0400)]
Merge branch 'main' into http-use-eauth

10 months agoci: stop on test failure
Edward Thomson [Sun, 29 Aug 2021 17:21:40 +0000 (29 13:21 -0400)]
ci: stop on test failure

10 months agobuf: deprecate public git_buf writing functions
Edward Thomson [Sun, 29 Aug 2021 17:10:44 +0000 (29 13:10 -0400)]
buf: deprecate public git_buf writing functions

A `git_buf` is now a read-only structure as far as callers are
concerned.  This is a mechanism that we can return data to callers
using memory that is owned by the library and can be cleaned up by
callers (using `git_buf_dispose`).

A `git_buf` can no longer be allocated by callers or provided to the
library.

10 months agofilter: deprecate apply function
Edward Thomson [Fri, 27 Aug 2021 21:06:50 +0000 (27 17:06 -0400)]
filter: deprecate apply function

10 months agoremote: deprecate resolve_url callback
Edward Thomson [Fri, 27 Aug 2021 15:25:51 +0000 (27 11:25 -0400)]
remote: deprecate resolve_url callback

Using a callback to set a resolve_url is not particularly idiomatic.
Deprecate it in favor of the `set_instance_url` and
`set_instance_pushurl` functions which can now be called from the
`git_remote_ready_cb` callback.

10 months agoremote: introduce git_remote_ready_cb
Edward Thomson [Fri, 27 Aug 2021 14:59:51 +0000 (27 10:59 -0400)]
remote: introduce git_remote_ready_cb

Introduce a new callback that fires when the remote is ready to connect.

10 months agorebase: deprecate signing_cb
Edward Thomson [Sun, 29 Aug 2021 14:14:01 +0000 (29 10:14 -0400)]
rebase: deprecate signing_cb

The signing callback should not be used; instead, callers should provide
a commit_create_cb, perform the signing and commit creation themselves.

10 months agorebase: introduce git_commit_create_cb
Edward Thomson [Sun, 29 Aug 2021 13:36:01 +0000 (29 09:36 -0400)]
rebase: introduce git_commit_create_cb

Introduce a new mechanism for `git_rebase_commit` for callers to
customize the experience.  Instead of assuming that we produce the
commit for them, provide a commit creation callback that allows callers
to produce the commit themselves and return the resulting commit id.

10 months agoMerge pull request #6015 from boretrk/c89-comments
Edward Thomson [Sun, 29 Aug 2021 10:36:59 +0000 (29 06:36 -0400)]
Merge pull request #6015 from boretrk/c89-comments

10 months agotests: change comments to c89 style
Peter Pettersson [Sun, 29 Aug 2021 10:19:49 +0000 (29 12:19 +0200)]
tests: change comments to c89 style

10 months agoMerge pull request #5508 from libgit2/ethomson/devcontainer
Edward Thomson [Sat, 28 Aug 2021 17:47:23 +0000 (28 13:47 -0400)]
Merge pull request #5508 from libgit2/ethomson/devcontainer

WIP: .devcontainer: settings for a codespace workflow

10 months agoMerge pull request #6013 from lolgear/cmake_hash_sha_missing_header
Edward Thomson [Sat, 28 Aug 2021 17:45:33 +0000 (28 13:45 -0400)]
Merge pull request #6013 from lolgear/cmake_hash_sha_missing_header

CMake. hash sha1 header has been added.

10 months agocmake: select hashes umbrella variable has been removed.
Dmitry Lobanov [Sat, 28 Aug 2021 17:18:38 +0000 (28 20:18 +0300)]
cmake: select hashes umbrella variable has been removed.

Co-authored-by: Edward Thomson <ethomson@github.com>
10 months agocmake: select hashes missing umbrella header has been added.
Dmitry Lobanov [Sat, 7 Aug 2021 12:56:29 +0000 (7 15:56 +0300)]
cmake: select hashes missing umbrella header has been added.

10 months agofilter: use streaming filters in tests
Edward Thomson [Fri, 27 Aug 2021 20:51:38 +0000 (27 16:51 -0400)]
filter: use streaming filters in tests

10 months agoident: use streaming filters
Edward Thomson [Fri, 27 Aug 2021 20:46:21 +0000 (27 16:46 -0400)]
ident: use streaming filters

10 months agocrlf: use streaming filters
Edward Thomson [Fri, 27 Aug 2021 20:43:00 +0000 (27 16:43 -0400)]
crlf: use streaming filters

10 months agofilter: proxy_stream is now git_filter_buffered_stream
Edward Thomson [Fri, 27 Aug 2021 19:59:01 +0000 (27 15:59 -0400)]
filter: proxy_stream is now git_filter_buffered_stream

The filter's proxy_stream is used to adapt filters that only provided an
`apply` function into a `stream` function.  Make this internal to the
library instead of private to the filter file.  This will allow the
filters to use it directly, instead of relying on the filter
functionality to do the proxying.

10 months agofilter: add docs for `git_filter_stream_fn`
Edward Thomson [Wed, 12 May 2021 21:13:12 +0000 (12 22:13 +0100)]
filter: add docs for `git_filter_stream_fn`

10 months agoremote: introduce set_instance_url
Edward Thomson [Thu, 13 May 2021 23:33:08 +0000 (14 00:33 +0100)]
remote: introduce set_instance_url

Users may want to override the URL on a particular instance of a remote,
instead of updating the configuration.  Previously, users could use a
callback to do this, but this is not particularly idiomatic.

10 months agoMerge pull request #6008 from boretrk/array
Edward Thomson [Fri, 27 Aug 2021 12:29:27 +0000 (27 08:29 -0400)]
Merge pull request #6008 from boretrk/array

git_array_alloc: return objects of correct type

10 months agoMerge pull request #5747 from lhchavez/atomic-tests
Edward Thomson [Fri, 27 Aug 2021 12:28:01 +0000 (27 08:28 -0400)]
Merge pull request #5747 from lhchavez/atomic-tests

Homogenize semantics for atomic-related functions

10 months agomidx: Introduce git_odb_write_multi_pack_index()
lhchavez [Tue, 18 Feb 2020 00:02:13 +0000 (18 00:02 +0000)]
midx: Introduce git_odb_write_multi_pack_index()

This change introduces git_odb_write_multi_pack_index(), which creates a
`multi-pack-index` file from all the `.pack` files that have been loaded
in the ODB.

Fixes: #5399

10 months agomidx: Add a way to write multi-pack-index files
lhchavez [Mon, 17 Feb 2020 21:28:13 +0000 (17 21:28 +0000)]
midx: Add a way to write multi-pack-index files

This change adds the git_midx_writer_* functions to allow to
write and create `multi-pack-index` files from `.idx`/`.pack` files.

Part of: #5399

10 months agoMerge remote-tracking branch 'origin/main' into multi-pack-index-write
lhchavez [Fri, 27 Aug 2021 11:06:54 +0000 (27 04:06 -0700)]
Merge remote-tracking branch 'origin/main' into multi-pack-index-write

10 months agoReview feedback
lhchavez [Fri, 27 Aug 2021 11:06:31 +0000 (27 04:06 -0700)]
Review feedback

10 months agoMerge pull request #6010 from A-Ovchinnikov-mx/a-ovchin/remote-head-branch-clone
Edward Thomson [Thu, 26 Aug 2021 21:29:37 +0000 (26 17:29 -0400)]
Merge pull request #6010 from A-Ovchinnikov-mx/a-ovchin/remote-head-branch-clone

Set refs/remotes/origin/HEAD to default branch when branch is specified

10 months agoFixups for the latest changes in the array interface
lhchavez [Thu, 26 Aug 2021 12:50:23 +0000 (26 05:50 -0700)]
Fixups for the latest changes in the array interface

10 months agoMerge remote-tracking branch 'origin/main' into cgraph-write
lhchavez [Thu, 26 Aug 2021 12:40:20 +0000 (26 05:40 -0700)]
Merge remote-tracking branch 'origin/main' into cgraph-write

10 months agoHomogenize semantics for atomic-related functions
lhchavez [Sun, 20 Dec 2020 20:45:01 +0000 (20 12:45 -0800)]
Homogenize semantics for atomic-related functions

There were some subtle semantic differences between the various
implementations of atomic functions. Now they behave the same, have
tests and are better documented to avoid this from happening again in
the future.

Of note:

* The semantics chosen for `git_atomic_compare_and_swap` match
  `InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now.
* The semantics chosen for `git_atomic_add` match
  `InterlockedAdd`/`__atomic_add_fetch`.
* `git_atomic_swap` and `git_atomic_load` still have a bit of semantic
  difference with the gcc builtins / msvc interlocked operations, since
  they require an l-value (not a pointer). If desired, this can be
  homogenized.

10 months agoMake the defaultable fields defaultable
lhchavez [Thu, 26 Aug 2021 12:29:34 +0000 (26 05:29 -0700)]
Make the defaultable fields defaultable

Also, add `git_commit_graph_writer_options_init`!

10 months agoCheck if default branch matches refspec
Alexander Ovchinnikov [Thu, 5 Aug 2021 12:02:54 +0000 (5 14:02 +0200)]
Check if default branch matches refspec

10 months agoclone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2
Alexander Ovchinnikov [Sun, 7 Feb 2021 23:49:21 +0000 (8 00:49 +0100)]
clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2

10 months agoRevert "Merge pull request #5775 from libgit2/ethomson/clone_branch"
Alexander Ovchinnikov [Sun, 7 Feb 2021 23:40:50 +0000 (8 00:40 +0100)]
Revert "Merge pull request #5775 from libgit2/ethomson/clone_branch"

This reverts commit 487f2a8287c4d1d41d39e05ac53d0e50c679d7e9, reversing
changes made to c6cf7f0e6927f1b264a7dda2467d70b9f744a01f.

10 months agogit_array_alloc: return objects of correct type
Peter Pettersson [Wed, 25 Aug 2021 20:12:57 +0000 (25 22:12 +0200)]
git_array_alloc: return objects of correct type

10 months agoMerge pull request #6007 from boretrk/array
Edward Thomson [Wed, 25 Aug 2021 19:24:35 +0000 (25 15:24 -0400)]
Merge pull request #6007 from boretrk/array

array: check dereference from void * type

10 months agoMerge pull request #6006 from boretrk/c11-warnings
Edward Thomson [Wed, 25 Aug 2021 18:11:03 +0000 (25 14:11 -0400)]
Merge pull request #6006 from boretrk/c11-warnings

GCC C11 warnings

10 months agoarray: fix dereference from void * type
Peter Pettersson [Wed, 25 Aug 2021 18:08:58 +0000 (25 20:08 +0200)]
array: fix dereference from void * type

10 months agoarray: make gcc keep the type of the NULL return value
Peter Pettersson [Wed, 25 Aug 2021 16:58:39 +0000 (25 18:58 +0200)]
array: make gcc keep the type of the NULL return value

10 months agowin32: name the dummy union in GIT_REPARSE_DATA_BUFFER
Peter Pettersson [Wed, 25 Aug 2021 16:14:10 +0000 (25 18:14 +0200)]
win32: name the dummy union in GIT_REPARSE_DATA_BUFFER

Instead of buf->"typeofbuffer"ReparseBuffer the members will be
referenced with buf->ReparseBuffer."typeofbuffer"

https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_reparse_data_buffer?redirectedfrom=MSDN
calls the union DUMMYUNIONNAME but that looks a bit cluttered.

10 months agoMerge pull request #5802 from lhchavez/git-warn-unused-result
Edward Thomson [Wed, 25 Aug 2021 16:30:06 +0000 (25 12:30 -0400)]
Merge pull request #5802 from lhchavez/git-warn-unused-result

Introduce GIT_WARN_UNUSED_RESULT

10 months agoMerge pull request #5950 from boretrk/posixtest
Edward Thomson [Wed, 25 Aug 2021 16:20:50 +0000 (25 12:20 -0400)]
Merge pull request #5950 from boretrk/posixtest

open: input validation for empty segments in path

10 months agoenable gcc warnings for C11 specific extensions
Peter Pettersson [Wed, 25 Aug 2021 16:07:01 +0000 (25 18:07 +0200)]
enable gcc warnings for C11 specific extensions

10 months agoMerge pull request #6005 from boretrk/c11-warnings
Edward Thomson [Wed, 25 Aug 2021 13:11:25 +0000 (25 09:11 -0400)]
Merge pull request #6005 from boretrk/c11-warnings

C11 warnings

10 months agoc90/c99: name the unnamed union in git_hash_ctx
Peter Pettersson [Wed, 25 Aug 2021 09:36:06 +0000 (25 11:36 +0200)]
c90/c99: name the unnamed union in git_hash_ctx

10 months agoenable warnings for C11 specific extensions
Peter Pettersson [Wed, 25 Aug 2021 09:34:59 +0000 (25 11:34 +0200)]
enable warnings for C11 specific extensions

10 months agoMerge pull request #5974 from libgit2/ethomson/dlopen_ssl
Edward Thomson [Tue, 24 Aug 2021 22:28:28 +0000 (24 18:28 -0400)]
Merge pull request #5974 from libgit2/ethomson/dlopen_ssl

Dynamically load OpenSSL (optionally)

10 months agoci: run dynamically loaded openssl workflows nightly
Edward Thomson [Tue, 24 Aug 2021 20:23:09 +0000 (24 16:23 -0400)]
ci: run dynamically loaded openssl workflows nightly

Add Xenial, Bionic, CentOS 7 and 8 workflows with OpenSSL-Dynamic builds
nightly.

10 months agoopenssl: lazily load libraries when dynamically loading
Edward Thomson [Tue, 24 Aug 2021 19:53:10 +0000 (24 15:53 -0400)]
openssl: lazily load libraries when dynamically loading

Defer dlopen until it's needed when dynamically loading OpenSSL
libraries.

10 months agoopenssl: dynamically load on macOS
Edward Thomson [Tue, 24 Aug 2021 18:08:43 +0000 (24 14:08 -0400)]
openssl: dynamically load on macOS

10 months agotests: show errors when libgit2_init fails
Edward Thomson [Tue, 24 Aug 2021 17:58:24 +0000 (24 13:58 -0400)]
tests: show errors when libgit2_init fails

10 months agontlmclient: update to ntlmclient 0.9.1
Edward Thomson [Tue, 24 Aug 2021 15:56:22 +0000 (24 11:56 -0400)]
ntlmclient: update to ntlmclient 0.9.1

The ntlmclient dependency can now dynamically load OpenSSL.

10 months agovalgrind: suppress leaks in dlopen and newer libraries
Edward Thomson [Sat, 21 Aug 2021 19:28:45 +0000 (21 15:28 -0400)]
valgrind: suppress leaks in dlopen and newer libraries

dlopen sets up some thread-local state that isn't cleaned up by
`dlclose`.  Additionally, now that we're linking against different
versions of libssh2 and OpenSSL, we're seeing different leak signatures.

10 months agoopenssl: dynamically load libssl and symbols (optionally)
Edward Thomson [Wed, 11 Aug 2021 00:30:38 +0000 (11 01:30 +0100)]
openssl: dynamically load libssl and symbols (optionally)

Provide an interface around OpenSSL to dynamically load the libraries
and symbols, so that users can distribute a libgit2 library that is not
linked directly against OpenSSL.  This enables users to target multiple
distributions with a single binary.

This mechanism is optional and disabled by default.  Configure cmake
with -DUSE_HTTPS=OpenSSL-Dynamic to use it.

10 months agoopenssl: separate legacy api
Edward Thomson [Wed, 11 Aug 2021 01:41:05 +0000 (10 21:41 -0400)]
openssl: separate legacy api

Refactor the OpenSSL stream implementation so that the legacy code is better
abstracted.  This will enable future development.

10 months agoMerge pull request #6000 from libgit2/ethomson/ci
Edward Thomson [Mon, 23 Aug 2021 19:27:42 +0000 (23 15:27 -0400)]
Merge pull request #6000 from libgit2/ethomson/ci

ci: tag new containers with the latest tag

10 months agoci: update container versions
Edward Thomson [Mon, 23 Aug 2021 19:02:49 +0000 (23 15:02 -0400)]
ci: update container versions

Update all the container versions to force a rebuild so that they'll get
tagged with latest (due to changes in the CI scripts).

10 months agoci: tag new containers with the latest tag
Edward Thomson [Mon, 23 Aug 2021 19:00:39 +0000 (23 15:00 -0400)]
ci: tag new containers with the latest tag

10 months agoMerge pull request #5995 from libgit2/ethomson/centos_ci
Edward Thomson [Sat, 21 Aug 2021 12:46:17 +0000 (21 08:46 -0400)]
Merge pull request #5995 from libgit2/ethomson/centos_ci

ci: update centos builds