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
6ac3b707
Commit
6ac3b707
authored
Nov 21, 2011
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add git_remote_connected
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent
4cf01e9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
include/git2/remote.h
+10
-0
src/remote.c
+5
-0
No files found.
include/git2/remote.h
View file @
6ac3b707
...
...
@@ -124,6 +124,16 @@ GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headarray *refs);
GIT_EXTERN
(
int
)
git_remote_download
(
char
**
filename
,
git_remote
*
remote
);
/**
* Check whether the remote is connected
*
* Check whether the remote's underlying transport is connected to the
* remote host.
*
* @return 1 if it's connected, 0 otherwise.
*/
GIT_EXTERN
(
int
)
git_remote_connected
(
git_remote
*
remote
);
/**
* Disconnect from the remote
*
* Close the connection to the remote and free the underlying
...
...
src/remote.c
View file @
6ac3b707
...
...
@@ -267,6 +267,11 @@ int git_remote_update_tips(struct git_remote *remote)
return
GIT_SUCCESS
;
}
int
git_remote_connected
(
git_remote
*
remote
)
{
return
remote
->
transport
==
NULL
?
0
:
remote
->
transport
->
connected
;
}
void
git_remote_disconnect
(
git_remote
*
remote
)
{
if
(
remote
->
transport
!=
NULL
)
{
...
...
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