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
8a2cdbd3
Commit
8a2cdbd3
authored
Feb 28, 2018
by
Steven King Jr
Committed by
Edward Thomson
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename unescape and make non-static
parent
31985775
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/netops.c
+3
-3
src/netops.h
+2
-0
No files found.
src/netops.c
View file @
8a2cdbd3
...
...
@@ -207,7 +207,7 @@ void gitno_connection_data_free_ptrs(gitno_connection_data *d)
}
#define hex2c(c) ((c | 32) % 39 - 9)
static
char
*
unescape
(
char
*
str
)
char
*
gitno_
unescape
(
char
*
str
)
{
int
x
,
y
;
int
len
=
(
int
)
strlen
(
str
);
...
...
@@ -274,8 +274,8 @@ int gitno_extract_url_parts(
if
(
u
.
field_set
&
(
1
<<
UF_USERINFO
))
{
const
char
*
colon
=
memchr
(
_userinfo
,
':'
,
u
.
field_data
[
UF_USERINFO
].
len
);
if
(
colon
)
{
*
username
=
unescape
(
git__substrdup
(
_userinfo
,
colon
-
_userinfo
));
*
password
=
unescape
(
git__substrdup
(
colon
+
1
,
u
.
field_data
[
UF_USERINFO
].
len
-
(
colon
+
1
-
_userinfo
)));
*
username
=
gitno_
unescape
(
git__substrdup
(
_userinfo
,
colon
-
_userinfo
));
*
password
=
gitno_
unescape
(
git__substrdup
(
colon
+
1
,
u
.
field_data
[
UF_USERINFO
].
len
-
(
colon
+
1
-
_userinfo
)));
GITERR_CHECK_ALLOC
(
*
password
);
}
else
{
*
username
=
git__substrdup
(
_userinfo
,
u
.
field_data
[
UF_USERINFO
].
len
);
...
...
src/netops.h
View file @
8a2cdbd3
...
...
@@ -96,4 +96,6 @@ int gitno_extract_url_parts(
const
char
*
url
,
const
char
*
default_port
);
char
*
gitno_unescape
(
char
*
str
);
#endif
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