summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* url: ensure minimum components for formattingv1.2.0maint/v1.2Edward Thomson2021-09-011-2/+3
|
* url: ensure minimum components for formattingEdward Thomson2021-09-011-0/+3
|
* Merge pull request #6026 from libgit2/ethomson/proxyEdward Thomson2021-09-0114-107/+565
|\ | | | | Update proxy configuration
| * remote: refactor proxy detectionEdward Thomson2021-09-017-221/+238
| | | | | | | | | | | | | | | | | | | | 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.
| * url: introduce `git_net_url_dup`Edward Thomson2021-09-012-0/+43
| |
| * url: introduce `git_net_url_matches_pattern_list`Edward Thomson2021-09-013-0/+71
| | | | | | | | | | | | 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.
| * url: introduce `git_net_url_matches_pattern`Edward Thomson2021-09-013-0/+114
| | | | | | | | | | Provide a method to determine if a given URL matches a host:port pattern like the ones found in `NO_PROXY` environment variables.
| * tests: create the network::url test hierarcyEdward Thomson2021-09-013-59/+59
| |
| * util: introduce `git__strlcmp`Edward Thomson2021-09-012-0/+22
| | | | | | | | | | | | | | 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).
| * Add NO_PROXY env supportMathieu Parent2021-09-016-9/+200
|/ | | | | | Item 2 of 3 from #4164 Signed-off-by: Mathieu Parent <math.parent@gmail.com>
* Merge pull request #6024 from lhchavez/fix-possible-null-pointer-dereferenceEdward Thomson2021-08-311-1/+2
|\ | | | | Fix a possible null pointer dereference
| * Fix a possible null pointer dereferencelhchavez2021-08-311-1/+2
|/ | | | | | | | 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
* v1.2: update version informationEdward Thomson2021-08-313-5/+5
|
* v1.2: changelogEdward Thomson2021-08-311-16/+170
|
* Merge pull request #5943 from kcsaul/fix/5851Edward Thomson2021-08-301-0/+6
|\ | | | | Fix worktree iteration when repository has no common directory
| * repo: fix worktree iteration when repo has no common directoryKevin Saul2021-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | When applying an operation to a repository created without a common directory, which is known to occur in scenarios where custom odb/refdb backends are used, git_repository_foreach_worktree currently asserts while attempting to open the repository located in the common directory. Fix this issue by applying operation to repository supplied when there are no linked worktrees to iterate (implied by common directory being empty).
* | Merge pull request #6022 from lollipopman/connect-proxy-host-headerEdward Thomson2021-08-301-1/+1
|\ \ | | | | | | Set Host Header to match CONNECT authority target
| * | Set Host Header to match CONNECT authority targetJesse Hathaway2021-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'cgraph-write' into mainEdward Thomson2021-08-306-4/+853
|\ \ \
| * | | commit graph: formatting fixesEdward Thomson2021-08-302-23/+21
| | | |
| * | | Merge remote-tracking branch 'origin/main' into cgraph-writelhchavez2021-08-2938-143/+1205
| |\ \ \
| * | | | Fixups for the latest changes in the array interfacelhchavez2021-08-261-11/+21
| | | | |
| * | | | Merge remote-tracking branch 'origin/main' into cgraph-writelhchavez2021-08-26114-1030/+3343
| |\ \ \ \
| * | | | | Make the defaultable fields defaultablelhchavez2021-08-263-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | Also, add `git_commit_graph_writer_options_init`!
| * | | | | Review feedbacklhchavez2021-08-011-37/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added the `PenaltyBreakAssignment: 1000` clang-format option to avoid breaking statements around the assignment operator. * Avoided using the dot initializer syntax. * Avoided casting allocations. * Also avoided casting `void *`.
| * | | | | commit-graph: Add a way to write commit-graph fileslhchavez2021-07-275-2/+829
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the git_commit_graph_writer_* functions to allow to write and create `commit-graph` files from `.idx`/`.pack` files or `git_revwalk`s. Part of: #5757
* | | | | | Merge pull request #6018 from libgit2/ethomson/fixupsEdward Thomson2021-08-307-15/+29
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fixes from code analysis
| * | | | | | date: promote before multiplyethomson/fixupsEdward Thomson2021-08-301-1/+1
| | | | | | |
| * | | | | | filter: don't overwrite error valueEdward Thomson2021-08-301-1/+2
| | | | | | |
| * | | | | | hashsig: close fd on errorEdward Thomson2021-08-301-1/+3
| | | | | | |
| * | | | | | error: don't check string after assertEdward Thomson2021-08-301-5/+0
| | | | | | |
| * | | | | | pack: don't assert in the lockEdward Thomson2021-08-301-3/+16
| | | | | | |
| * | | | | | midx: return an error when detectedEdward Thomson2021-08-301-3/+7
| | | | | | |
| * | | | | | httpclient: actually return `GIT_EAUTH`Edward Thomson2021-08-301-1/+0
|/ / / / / /
* | | | | | Merge pull request #6017 from libgit2/ethomson/buf_is_readonlyEdward Thomson2021-08-292-0/+114
|\ \ \ \ \ \ | | | | | | | | | | | | | | buf: deprecate public git_buf writing functions
| * | | | | | buf: deprecate public git_buf writing functionsethomson/buf_is_readonlyEdward Thomson2021-08-292-0/+114
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge pull request #6011 from libgit2/ethomson/filter_applyEdward Thomson2021-08-297-86/+190
|\ \ \ \ \ \ | | | | | | | | | | | | | | filter: filter drivers stop taking git_buf as user input
| * | | | | | filter: deprecate apply functionethomson/filter_applyEdward Thomson2021-08-292-13/+36
| | | | | | |
| * | | | | | filter: use streaming filters in testsEdward Thomson2021-08-272-3/+36
| | | | | | |
| * | | | | | ident: use streaming filtersEdward Thomson2021-08-271-1/+12
| | | | | | |
| * | | | | | crlf: use streaming filtersEdward Thomson2021-08-271-1/+12
| | | | | | |
| * | | | | | filter: proxy_stream is now git_filter_buffered_streamEdward Thomson2021-08-272-43/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | filter: add docs for `git_filter_stream_fn`Edward Thomson2021-08-271-28/+41
| |/ / / / /
* | | | | | Merge pull request #6016 from libgit2/ethomson/commit_create_cbEdward Thomson2021-08-295-59/+402
|\ \ \ \ \ \ | | | | | | | | | | | | | | Introduce `create_commit_cb`, deprecate `signing_cb`
| * | | | | | rebase: deprecate signing_cbethomson/commit_create_cbEdward Thomson2021-08-295-34/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signing callback should not be used; instead, callers should provide a commit_create_cb, perform the signing and commit creation themselves.
| * | | | | | rebase: introduce git_commit_create_cbEdward Thomson2021-08-294-35/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge pull request #6012 from libgit2/ethomson/custom_urlEdward Thomson2021-08-294-9/+207
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | remote: introduce remote_ready_cb, deprecate resolve_url callback
| * | | | | | | remote: deprecate resolve_url callbackethomson/custom_urlEdward Thomson2021-08-293-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | remote: introduce git_remote_ready_cbEdward Thomson2021-08-294-4/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new callback that fires when the remote is ready to connect.
| * | | | | | | remote: introduce set_instance_urlEdward Thomson2021-08-273-3/+102
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.