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
b4342b11
Commit
b4342b11
authored
Oct 04, 2013
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net: advertise our support for fixing thin packs
parent
0b33fca0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
+12
-1
src/transports/smart.h
+3
-1
src/transports/smart_pkt.c
+3
-0
src/transports/smart_protocol.c
+6
-0
No files found.
src/transports/smart.h
View file @
b4342b11
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#define GIT_CAP_INCLUDE_TAG "include-tag"
#define GIT_CAP_INCLUDE_TAG "include-tag"
#define GIT_CAP_DELETE_REFS "delete-refs"
#define GIT_CAP_DELETE_REFS "delete-refs"
#define GIT_CAP_REPORT_STATUS "report-status"
#define GIT_CAP_REPORT_STATUS "report-status"
#define GIT_CAP_THIN_PACK "thin-pack"
enum
git_pkt_type
{
enum
git_pkt_type
{
GIT_PKT_CMD
,
GIT_PKT_CMD
,
...
@@ -116,7 +117,8 @@ typedef struct transport_smart_caps {
...
@@ -116,7 +117,8 @@ typedef struct transport_smart_caps {
side_band_64k
:
1
,
side_band_64k
:
1
,
include_tag
:
1
,
include_tag
:
1
,
delete_refs
:
1
,
delete_refs
:
1
,
report_status
:
1
;
report_status
:
1
,
thin_pack
:
1
;
}
transport_smart_caps
;
}
transport_smart_caps
;
typedef
void
(
*
packetsize_cb
)(
size_t
received
,
void
*
payload
);
typedef
void
(
*
packetsize_cb
)(
size_t
received
,
void
*
payload
);
...
...
src/transports/smart_pkt.c
View file @
b4342b11
...
@@ -472,6 +472,9 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
...
@@ -472,6 +472,9 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
if
(
caps
->
include_tag
)
if
(
caps
->
include_tag
)
git_buf_puts
(
&
str
,
GIT_CAP_INCLUDE_TAG
" "
);
git_buf_puts
(
&
str
,
GIT_CAP_INCLUDE_TAG
" "
);
if
(
caps
->
thin_pack
)
git_buf_puts
(
&
str
,
GIT_CAP_THIN_PACK
" "
);
if
(
git_buf_oom
(
&
str
))
if
(
git_buf_oom
(
&
str
))
return
-
1
;
return
-
1
;
...
...
src/transports/smart_protocol.c
View file @
b4342b11
...
@@ -128,6 +128,12 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps)
...
@@ -128,6 +128,12 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps)
continue
;
continue
;
}
}
if
(
!
git__prefixcmp
(
ptr
,
GIT_CAP_THIN_PACK
))
{
caps
->
common
=
caps
->
thin_pack
=
1
;
ptr
+=
strlen
(
GIT_CAP_THIN_PACK
);
continue
;
}
/* We don't know this capability, so skip it */
/* We don't know this capability, so skip it */
ptr
=
strchr
(
ptr
,
' '
);
ptr
=
strchr
(
ptr
,
' '
);
}
}
...
...
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