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
9a5f2118
Commit
9a5f2118
authored
Oct 23, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1906 from libgit2/cmn/net-cb-errors
transport: let the progress output return an error
parents
1c74686e
5cb13670
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
include/git2/remote.h
+1
-1
include/git2/transport.h
+1
-1
src/transports/smart_protocol.c
+4
-1
No files found.
include/git2/remote.h
View file @
9a5f2118
...
...
@@ -410,7 +410,7 @@ struct git_remote_callbacks {
* progress side-band will be passed to this function (this is
* the 'counting objects' output.
*/
void
(
*
progress
)(
const
char
*
str
,
int
len
,
void
*
data
);
int
(
*
progress
)(
const
char
*
str
,
int
len
,
void
*
data
);
/**
* Completion is called when different parts of the download
...
...
include/git2/transport.h
View file @
9a5f2118
...
...
@@ -170,7 +170,7 @@ typedef enum {
GIT_TRANSPORTFLAGS_NO_CHECK_CERT
=
1
}
git_transport_flags_t
;
typedef
void
(
*
git_transport_message_cb
)(
const
char
*
str
,
int
len
,
void
*
data
);
typedef
int
(
*
git_transport_message_cb
)(
const
char
*
str
,
int
len
,
void
*
data
);
typedef
struct
git_transport
git_transport
;
...
...
src/transports/smart_protocol.c
View file @
9a5f2118
...
...
@@ -509,7 +509,10 @@ int git_smart__download_pack(
if
(
pkt
->
type
==
GIT_PKT_PROGRESS
)
{
if
(
t
->
progress_cb
)
{
git_pkt_progress
*
p
=
(
git_pkt_progress
*
)
pkt
;
t
->
progress_cb
(
p
->
data
,
p
->
len
,
t
->
message_cb_payload
);
if
(
t
->
progress_cb
(
p
->
data
,
p
->
len
,
t
->
message_cb_payload
))
{
giterr_set
(
GITERR_NET
,
"The fetch was cancelled by the user"
);
return
GIT_EUSER
;
}
}
git__free
(
pkt
);
}
else
if
(
pkt
->
type
==
GIT_PKT_DATA
)
{
...
...
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