File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,11 @@ bool git_net_url_is_default_port(git_net_url *url)
345345 return false;
346346}
347347
348+ bool git_net_url_is_ipv6 (git_net_url * url )
349+ {
350+ return (strchr (url -> host , ':' ) != NULL );
351+ }
352+
348353void git_net_url_swap (git_net_url * a , git_net_url * b )
349354{
350355 git_net_url tmp = GIT_NET_URL_INIT ;
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ extern bool git_net_url_valid(git_net_url *url);
3636/** Returns true if the URL is on the default port. */
3737extern bool git_net_url_is_default_port (git_net_url * url );
3838
39+ /** Returns true if the host portion of the URL is an ipv6 address. */
40+ extern bool git_net_url_is_ipv6 (git_net_url * url );
41+
3942/* Applies a redirect to the URL with a git-aware service suffix. */
4043extern int git_net_url_apply_redirect (
4144 git_net_url * url ,
You can’t perform that action at this time.
0 commit comments