| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Code cleanup to use `git_buf`s instead of simple c strings.
|
| |
|
|\ |
|
|/
|
|
|
|
|
| |
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).
|
|\
| |
| | |
#6028: Check if `threadstate->error_t.message` is not `git_buf__initbuf` before freeing.
|
|/
|
|
|
|
| |
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.
|
| |
|
| |
|
|\
| |
| | |
Update proxy configuration
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Provide a method to determine if a given URL matches a host:port pattern
like the ones found in `NO_PROXY` environment variables.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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).
|
|/
|
|
|
|
| |
Item 2 of 3 from #4164
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
|
|\
| |
| | |
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
|
| |
|
| |
|
|\
| |
| | |
Fix worktree iteration when repository has no common directory
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
|\ \
| | |
| | | |
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.
|
|\ \ \ |
|
| | | | |
|
| |\ \ \ |
|
| | | | | |
|
| |\ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also, add `git_commit_graph_writer_options_init`!
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* 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 *`.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fixes from code analysis
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
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.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
filter: filter drivers stop taking git_buf as user input
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| |/ / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Introduce `create_commit_cb`, deprecate `signing_cb`
|