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
32586d5e
Commit
32586d5e
authored
Apr 11, 2018
by
Etienne Samson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smart: separate error handling from pkt handling
parent
01381149
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
src/transports/smart_protocol.c
+6
-7
No files found.
src/transports/smart_protocol.c
View file @
32586d5e
...
...
@@ -397,10 +397,10 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
if
((
error
=
store_common
(
t
))
<
0
)
goto
on_error
;
}
else
{
error
=
recv_pkt
(
NULL
,
&
pkt_type
,
buf
);
if
(
error
<
0
)
{
if
((
error
=
recv_pkt
(
NULL
,
&
pkt_type
,
buf
))
<
0
)
goto
on_error
;
}
else
if
(
pkt_type
==
GIT_PKT_ACK
)
{
if
(
pkt_type
==
GIT_PKT_ACK
)
{
break
;
}
else
if
(
pkt_type
==
GIT_PKT_NAK
)
{
continue
;
...
...
@@ -469,11 +469,10 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
/* Now let's eat up whatever the server gives us */
if
(
!
t
->
caps
.
multi_ack
&&
!
t
->
caps
.
multi_ack_detailed
)
{
error
=
recv_pkt
(
NULL
,
&
pkt_type
,
buf
);
if
(
error
<
0
)
{
if
((
error
=
recv_pkt
(
NULL
,
&
pkt_type
,
buf
))
<
0
)
return
error
;
}
else
if
(
pkt_type
!=
GIT_PKT_ACK
&&
pkt_type
!=
GIT_PKT_NAK
)
{
if
(
pkt_type
!=
GIT_PKT_ACK
&&
pkt_type
!=
GIT_PKT_NAK
)
{
giterr_set
(
GITERR_NET
,
"Unexpected pkt type"
);
return
-
1
;
}
...
...
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