|
f0e693b1
|
2021-09-07T17:53:49
|
|
str: introduce `git_str` for internal, `git_buf` is external
libgit2 has two distinct requirements that were previously solved by
`git_buf`. We require:
1. A general purpose string class that provides a number of utility APIs
for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
can take ownership of.
By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.
Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class. The name also
is an homage to Junio Hamano ("gitstr").
The public API remains `git_buf`, and has a much smaller footprint. It
is generally only used as an "out" param with strict requirements that
follow the documentation. (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)
Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
|
|
4fd32be0
|
2021-09-01T23:06:19
|
|
url: ensure minimum components for formatting
|
|
fd50810a
|
2021-09-01T22:49:14
|
|
url: ensure minimum components for formatting
|
|
f89dc917
|
2021-09-01T20:30:59
|
|
url: introduce `git_net_url_dup`
|
|
9e98e443
|
2021-08-31T22:01:34
|
|
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.
|
|
e5ba0a3c
|
2021-08-31T20:41:45
|
|
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.
|
|
27301cd0
|
2020-12-17T20:53:11
|
|
net: function to identify ipv6 addresses in URLs
|
|
953dee20
|
2020-12-17T20:51:37
|
|
net: is_default_port is a bool
|
|
ea7c807a
|
2020-04-05T17:18:46
|
|
net: use GIT_ASSERT
|
|
e316b0d3
|
2020-05-15T11:47:09
|
|
runtime: move init/shutdown into the "runtime"
Provide a mechanism for system components to register for initialization
and shutdown of the libgit2 runtime.
|
|
7e1f0b22
|
2020-08-31T21:54:17
|
|
Return false instead of segfaulting when checking for default port
`default_port_for_scheme` returns NULL if the scheme is not one of the
builtin ones. This may cause a segmentation fault if a custom transport
URL happens to contain a port number, and this code path is triggered
(e.g. by setting git_fetch_options->update_fetchhead to 1).
|
|
0e39a8fa
|
2019-12-29T10:05:14
|
|
net: free the url's query component
|
|
0b8358c8
|
2019-12-14T11:04:58
|
|
net: introduce path formatting function
Introduce a function to format the path and query string for a URL,
suitable for creating an HTTP request.
|
|
a591f362
|
2019-12-09T19:48:10
|
|
net: introduce url formatting function
|
|
e995f74e
|
2019-12-06T15:39:08
|
|
net: introduce git_net_url_joinpath
Provide a mechanism to add a path and query string to an existing url
so that we can easily append `/info/refs?...` type url segments to a url
given to us by a user.
|
|
471daeea
|
2019-12-01T14:00:49
|
|
net: refactor gitno redirect handling
Move the redirect handling into `git_net_url` for consistency.
|
|
297c61e4
|
2019-12-01T10:06:11
|
|
net: add an isvalid function
(Also, mark all the declarations as extern.)
|
|
ba2885da
|
2019-07-24T18:05:28
|
|
git_net_url_parse: don't git_buf_decode_percent for path
|
|
c6ab183e
|
2019-03-11T11:43:08
|
|
net: rename gitno_connection_data to git_net_url
"Connection data" is an imprecise and largely incorrect name; these
structures are actually parsed URLs. Provide a parser that takes a URL
string and produces a URL structure (if it is valid).
Separate the HTTP redirect handling logic from URL parsing, keeping a
`gitno_connection_data_handle_redirect` whose only job is redirect
handling logic and does not parse URLs itself.
|