Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
27301cd0
Commit
27301cd0
authored
Dec 17, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: function to identify ipv6 addresses in URLs
parent
953dee20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/net.c
+5
-0
src/net.h
+3
-0
No files found.
src/net.c
View file @
27301cd0
...
...
@@ -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
;
...
...
src/net.h
View file @
27301cd0
...
...
@@ -36,6 +36,9 @@ extern bool git_net_url_valid(git_net_url *url);
/** Returns true if the URL is on the default port. */
extern
bool
git_net_url_is_default_port
(
git_net_url
*
url
);
/** Returns true if the host portion of the URL is an ipv6 address. */
extern
bool
git_net_url_is_ipv6
(
git_net_url
*
url
);
/* Applies a redirect to the URL with a git-aware service suffix. */
extern
int
git_net_url_apply_redirect
(
git_net_url
*
url
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment