File tree Expand file tree Collapse file tree 2 files changed +3
-26
lines changed
Expand file tree Collapse file tree 2 files changed +3
-26
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ typedef enum {
4040 GIT_PKT_HAVE ,
4141 GIT_PKT_ACK ,
4242 GIT_PKT_NAK ,
43- GIT_PKT_PACK ,
43+ GIT_PKT_PACK__UNUSED ,
4444 GIT_PKT_COMMENT ,
4545 GIT_PKT_ERR ,
4646 GIT_PKT_DATA ,
Original file line number Diff line number Diff line change @@ -86,19 +86,6 @@ static int nak_pkt(git_pkt **out)
8686 return 0 ;
8787}
8888
89- static int pack_pkt (git_pkt * * out )
90- {
91- git_pkt * pkt ;
92-
93- pkt = git__malloc (sizeof (git_pkt ));
94- GITERR_CHECK_ALLOC (pkt );
95-
96- pkt -> type = GIT_PKT_PACK ;
97- * out = pkt ;
98-
99- return 0 ;
100- }
101-
10289static int comment_pkt (git_pkt * * out , const char * line , size_t len )
10390{
10491 git_pkt_comment * pkt ;
@@ -370,7 +357,7 @@ static int32_t parse_len(const char *line)
370357 num [k ] = '.' ;
371358 }
372359 }
373-
360+
374361 giterr_set (GITERR_NET , "invalid hex digit in length: '%s'" , num );
375362 return -1 ;
376363 }
@@ -407,17 +394,7 @@ int git_pkt_parse_line(
407394
408395 len = parse_len (line );
409396 if (len < 0 ) {
410- /*
411- * If we fail to parse the length, it might be because the
412- * server is trying to send us the packfile already.
413- */
414- if (bufflen >= 4 && !git__prefixcmp (line , "PACK" )) {
415- giterr_clear ();
416- * out = line ;
417- return pack_pkt (head );
418- }
419-
420- return (int )len ;
397+ return GIT_ERROR ;
421398 }
422399
423400 /*
You can’t perform that action at this time.
0 commit comments