diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-12-17 20:53:11 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-12-17 22:13:26 +0000 |
commit | 5864a742e9997ea9bda04931e14b4fd0d97d122e (patch) | |
tree | e5a63369c978c7d721f9fc00a3266c9b1f5333d7 /src/net.c | |
parent | 9443e6135e44e5db9003195b70683c809bb134b4 (diff) | |
download | libgit2-ethomson/ipv6.tar.gz |
net: function to identify ipv6 addresses in URLsethomson/ipv6
Diffstat (limited to 'src/net.c')
-rw-r--r-- | src/net.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -345,6 +345,11 @@ bool git_net_url_is_default_port(git_net_url *url) return false; } +bool git_net_url_is_ipv6(git_net_url *url) +{ + return (strchr(url->host, ':') != NULL); +} + void git_net_url_swap(git_net_url *a, git_net_url *b) { git_net_url tmp = GIT_NET_URL_INIT; |