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
86faea5f
Commit
86faea5f
authored
Jun 16, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3225 from libgit2/cmn/url-empty
remote: return EINVALIDSPEC when given an empty URL
parents
aeb2b991
47a40d1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/remote.c
+6
-2
No files found.
src/remote.c
View file @
86faea5f
...
...
@@ -167,14 +167,18 @@ static int get_check_cert(int *out, git_repository *repo)
static
int
canonicalize_url
(
git_buf
*
out
,
const
char
*
in
)
{
#ifdef GIT_WIN32
const
char
*
c
;
if
(
in
==
NULL
||
strlen
(
in
)
==
0
)
{
giterr_set
(
GITERR_INVALID
,
"cannot set empty URL"
);
return
GIT_EINVALIDSPEC
;
}
#ifdef GIT_WIN32
/* Given a UNC path like \\server\path, we need to convert this
* to //server/path for compatibility with core git.
*/
if
(
in
[
0
]
==
'\\'
&&
in
[
1
]
==
'\\'
&&
(
git__isalpha
(
in
[
2
])
||
git__isdigit
(
in
[
2
])))
{
const
char
*
c
;
for
(
c
=
in
;
*
c
;
c
++
)
git_buf_putc
(
out
,
*
c
==
'\\'
?
'/'
:
*
c
);
...
...
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