summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* filter: use a `git_oid` in filter options, not a pointerethomson/filter_optsEdward Thomson2021-09-059-32/+39
| | | | | | | Using a `git_oid *` in filter options was a mistake; it is a deviation from our typical pattern, and callers in some languages that GC may need very special treatment in order to pass both an options structure and a pointer outside of it.
* README: update build badges for our branchesEdward Thomson2021-09-051-1/+1
|
* Merge pull request #6032 from lhchavez/git-extern-git-remote-name-is-validEdward Thomson2021-09-041-1/+1
|\
| * remote: Mark `git_remote_name_is_valid` as `GIT_EXTERN`lhchavez2021-09-041-1/+1
|/ | | | | | | This change makes `git_remote_name_is_valid` be part of the public interface of the library. This is needed for other language bindings to be able to find this symbol (like in git2go, when linking against libgit2 dynamically).
* Merge pull request #6029 from arroz/fix_6028Edward Thomson2021-09-021-1/+2
|\ | | | | #6028: Check if `threadstate->error_t.message` is not `git_buf__initbuf` before freeing.
| * #6028: Check if `threadstate->error_t.message` is not `git_buf__initbuf` ↵Miguel Arroz2021-09-021-1/+2
|/ | | | | | before freeing. This follows the same principle as `buffer.c` where the same check is done before freeing the buffer. It fixes the crash described in #6028.
* 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`