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
fa401a32
Unverified
Commit
fa401a32
authored
7 years ago
by
Patrick Steinhardt
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4704 from nelhage/no-pkt-pack
Remove GIT_PKT_PACK entirely
parents
99bb98c0
388149f5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
24 deletions
+4
-24
src/transports/smart.h
+0
-1
src/transports/smart_pkt.c
+4
-17
src/transports/smart_protocol.c
+0
-6
No files found.
src/transports/smart.h
View file @
fa401a32
...
...
@@ -40,7 +40,6 @@ typedef enum {
GIT_PKT_HAVE
,
GIT_PKT_ACK
,
GIT_PKT_NAK
,
GIT_PKT_PACK
,
GIT_PKT_COMMENT
,
GIT_PKT_ERR
,
GIT_PKT_DATA
,
...
...
This diff is collapsed.
Click to expand it.
src/transports/smart_pkt.c
View file @
fa401a32
...
...
@@ -86,19 +86,6 @@ static int nak_pkt(git_pkt **out)
return
0
;
}
static
int
pack_pkt
(
git_pkt
**
out
)
{
git_pkt
*
pkt
;
pkt
=
git__malloc
(
sizeof
(
git_pkt
));
GITERR_CHECK_ALLOC
(
pkt
);
pkt
->
type
=
GIT_PKT_PACK
;
*
out
=
pkt
;
return
0
;
}
static
int
comment_pkt
(
git_pkt
**
out
,
const
char
*
line
,
size_t
len
)
{
git_pkt_comment
*
pkt
;
...
...
@@ -417,12 +404,12 @@ int git_pkt_parse_line(
* server is trying to send us the packfile already.
*/
if
(
bufflen
>=
4
&&
!
git__prefixcmp
(
line
,
"PACK"
))
{
giterr_
clear
(
);
*
out
=
line
;
return
pack_pkt
(
head
);
giterr_
set
(
GITERR_NET
,
"unexpected pack file"
);
}
else
{
giterr_set
(
GITERR_NET
,
"bad packet length"
);
}
return
(
int
)
len
;
return
-
1
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
src/transports/smart_protocol.c
View file @
fa401a32
...
...
@@ -70,12 +70,6 @@ int git_smart__store_refs(transport_smart *t, int flushes)
return
-
1
;
}
if
(
pkt
->
type
==
GIT_PKT_PACK
)
{
giterr_set
(
GITERR_NET
,
"unexpected packfile"
);
git__free
(
pkt
);
return
-
1
;
}
if
(
pkt
->
type
!=
GIT_PKT_FLUSH
&&
git_vector_insert
(
refs
,
pkt
)
<
0
)
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
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