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
27372263
Commit
27372263
authored
Oct 24, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2644 from libgit2/cmn/remove-supported-url
remote: delete git_remote_supported_url()
parents
4bb6ffb6
0862f617
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
42 deletions
+3
-42
CHANGELOG.md
+3
-0
include/git2/remote.h
+0
-13
src/transport.c
+0
-9
tests/network/remote/remotes.c
+0
-20
No files found.
CHANGELOG.md
View file @
27372263
...
@@ -46,6 +46,9 @@ v0.21 + 1
...
@@ -46,6 +46,9 @@ v0.21 + 1
*
git_remote_delete() now accepts the repository and the remote's name
*
git_remote_delete() now accepts the repository and the remote's name
instead of a loaded remote.
instead of a loaded remote.
*
git_remote_supported_url() has been removed as it has become
essentially useless with rsync-style ssh paths.
*
The git_clone_options struct no longer provides the ignore_cert_errors or
*
The git_clone_options struct no longer provides the ignore_cert_errors or
remote_name members for remote customization.
remote_name members for remote customization.
...
...
include/git2/remote.h
View file @
27372263
...
@@ -390,19 +390,6 @@ GIT_EXTERN(int) git_remote_fetch(
...
@@ -390,19 +390,6 @@ GIT_EXTERN(int) git_remote_fetch(
const
char
*
reflog_message
);
const
char
*
reflog_message
);
/**
/**
*
* Return whether the library supports a particular URL scheme
*
* Both the built-in and externally-registered transport lists are
* searched for a transport which supports the scheme of the given
* URL.
*
* @param url the url to check
* @return 1 if the url is supported, 0 otherwise
*/
GIT_EXTERN
(
int
)
git_remote_supported_url
(
const
char
*
url
);
/**
* Get a list of the configured remotes for a repo
* Get a list of the configured remotes for a repo
*
*
* The string array must be freed by the user.
* The string array must be freed by the user.
...
...
src/transport.c
View file @
27372263
...
@@ -212,15 +212,6 @@ done:
...
@@ -212,15 +212,6 @@ done:
return
error
;
return
error
;
}
}
int
git_remote_supported_url
(
const
char
*
url
)
{
git_transport_cb
fn
;
void
*
param
;
/* The only error we expect is ENOTFOUND */
return
!
transport_find_fn
(
&
fn
,
url
,
&
param
);
}
int
git_transport_init
(
git_transport
*
opts
,
unsigned
int
version
)
int
git_transport_init
(
git_transport
*
opts
,
unsigned
int
version
)
{
{
GIT_INIT_STRUCTURE_FROM_TEMPLATE
(
GIT_INIT_STRUCTURE_FROM_TEMPLATE
(
...
...
tests/network/remote/remotes.c
View file @
27372263
...
@@ -91,26 +91,6 @@ void test_network_remote_remotes__error_when_no_push_available(void)
...
@@ -91,26 +91,6 @@ void test_network_remote_remotes__error_when_no_push_available(void)
git_remote_free
(
r
);
git_remote_free
(
r
);
}
}
void
test_network_remote_remotes__supported_urls
(
void
)
{
int
ssh_supported
=
0
,
https_supported
=
0
;
#ifdef GIT_SSH
ssh_supported
=
1
;
#endif
#if defined(GIT_SSL) || defined(GIT_WINHTTP)
https_supported
=
1
;
#endif
cl_assert
(
git_remote_supported_url
(
"git://github.com/libgit2/libgit2"
));
cl_assert
(
git_remote_supported_url
(
"http://github.com/libgit2/libgit2"
));
cl_assert_equal_i
(
ssh_supported
,
git_remote_supported_url
(
"git@github.com:libgit2/libgit2.git"
));
cl_assert_equal_i
(
ssh_supported
,
git_remote_supported_url
(
"ssh://git@github.com/libgit2/libgit2.git"
));
cl_assert_equal_i
(
https_supported
,
git_remote_supported_url
(
"https://github.com/libgit2/libgit2.git"
));
}
void
test_network_remote_remotes__refspec_parsing
(
void
)
void
test_network_remote_remotes__refspec_parsing
(
void
)
{
{
cl_assert_equal_s
(
git_refspec_src
(
_refspec
),
"refs/heads/*"
);
cl_assert_equal_s
(
git_refspec_src
(
_refspec
),
"refs/heads/*"
);
...
...
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