@@ -383,6 +383,7 @@ pub struct git_fetch_options {
383383 pub update_fetchhead : c_int ,
384384 pub download_tags : git_remote_autotag_option_t ,
385385 pub proxy_opts : git_proxy_options ,
386+ pub follow_redirects : git_remote_redirect_t ,
386387 pub custom_headers : git_strarray ,
387388}
388389
@@ -609,6 +610,7 @@ pub struct git_status_options {
609610 pub flags : c_uint ,
610611 pub pathspec : git_strarray ,
611612 pub baseline : * mut git_tree ,
613+ pub rename_threshold : u16 ,
612614}
613615
614616#[ repr( C ) ]
@@ -728,7 +730,7 @@ pub struct git_tree_update {
728730#[ derive( Copy , Clone ) ]
729731pub struct git_buf {
730732 pub ptr : * mut c_char ,
731- pub asize : size_t ,
733+ pub reserved : size_t ,
732734 pub size : size_t ,
733735}
734736
@@ -951,6 +953,7 @@ pub struct git_push_options {
951953 pub pb_parallelism : c_uint ,
952954 pub callbacks : git_remote_callbacks ,
953955 pub proxy_opts : git_proxy_options ,
956+ pub follow_redirects : git_remote_redirect_t ,
954957 pub custom_headers : git_strarray ,
955958}
956959
@@ -1356,55 +1359,66 @@ pub type git_transport_cb = Option<
13561359#[ repr( C ) ]
13571360pub struct git_transport {
13581361 pub version : c_uint ,
1359- pub set_callbacks : Option <
1362+ pub connect : Option <
13601363 extern "C" fn (
1361- * mut git_transport ,
1362- git_transport_message_cb ,
1363- git_transport_message_cb ,
1364- git_transport_certificate_check_cb ,
1365- * mut c_void ,
1364+ transport : * mut git_transport ,
1365+ url : * const c_char ,
1366+ direction : c_int ,
1367+ connect_opts : * const git_remote_connect_options ,
13661368 ) -> c_int ,
13671369 > ,
1368- pub set_custom_headers : Option < extern "C" fn ( * mut git_transport , * const git_strarray ) -> c_int > ,
1369- pub connect : Option <
1370+ pub set_connect_opts : Option <
13701371 extern "C" fn (
1371- * mut git_transport ,
1372- * const c_char ,
1373- git_cred_acquire_cb ,
1374- * mut c_void ,
1375- * const git_proxy_options ,
1376- c_int ,
1377- c_int ,
1372+ transport : * mut git_transport ,
1373+ connect_opts : * const git_remote_connect_options ,
13781374 ) -> c_int ,
13791375 > ,
1376+ pub capabilities :
1377+ Option < extern "C" fn ( capabilities : * mut c_uint , transport : * mut git_transport ) -> c_int > ,
13801378 pub ls : Option <
1381- extern "C" fn ( * mut * mut * const git_remote_head , * mut size_t , * mut git_transport ) -> c_int ,
1382- > ,
1383- pub push : Option <
1384- extern "C" fn ( * mut git_transport , * mut git_push , * const git_remote_callbacks ) -> c_int ,
1379+ extern "C" fn (
1380+ out : * mut * mut * const git_remote_head ,
1381+ size : * mut size_t ,
1382+ transport : * mut git_transport ,
1383+ ) -> c_int ,
13851384 > ,
1385+ pub push : Option < extern "C" fn ( transport : * mut git_transport , push : * mut git_push ) -> c_int > ,
13861386 pub negotiate_fetch : Option <
13871387 extern "C" fn (
1388- * mut git_transport ,
1389- * mut git_repository ,
1390- * const * const git_remote_head ,
1391- size_t ,
1388+ transport : * mut git_transport ,
1389+ repo : * mut git_repository ,
1390+ refs : * const * const git_remote_head ,
1391+ count : size_t ,
13921392 ) -> c_int ,
13931393 > ,
13941394 pub download_pack : Option <
13951395 extern "C" fn (
1396- * mut git_transport ,
1397- * mut git_repository ,
1398- * mut git_indexer_progress ,
1399- git_indexer_progress_cb ,
1400- * mut c_void ,
1396+ transport : * mut git_transport ,
1397+ repo : * mut git_repository ,
1398+ stats : * mut git_indexer_progress ,
14011399 ) -> c_int ,
14021400 > ,
1403- pub is_connected : Option < extern "C" fn ( * mut git_transport ) -> c_int > ,
1404- pub read_flags : Option < extern "C" fn ( * mut git_transport , * mut c_int ) -> c_int > ,
1405- pub cancel : Option < extern "C" fn ( * mut git_transport ) > ,
1406- pub close : Option < extern "C" fn ( * mut git_transport ) -> c_int > ,
1407- pub free : Option < extern "C" fn ( * mut git_transport ) > ,
1401+ pub is_connected : Option < extern "C" fn ( transport : * mut git_transport ) -> c_int > ,
1402+ pub cancel : Option < extern "C" fn ( transport : * mut git_transport ) > ,
1403+ pub close : Option < extern "C" fn ( transport : * mut git_transport ) -> c_int > ,
1404+ pub free : Option < extern "C" fn ( transport : * mut git_transport ) > ,
1405+ }
1406+
1407+ #[ repr( C ) ]
1408+ pub struct git_remote_connect_options {
1409+ pub version : c_uint ,
1410+ pub callbacks : git_remote_callbacks ,
1411+ pub proxy_opts : git_proxy_options ,
1412+ pub follow_redirects : git_remote_redirect_t ,
1413+ pub custom_headers : git_strarray ,
1414+ }
1415+
1416+ git_enum ! {
1417+ pub enum git_remote_redirect_t {
1418+ GIT_REMOTE_REDIRECT_NONE = 1 << 0 ,
1419+ GIT_REMOTE_REDIRECT_INITIAL = 1 << 1 ,
1420+ GIT_REMOTE_REDIRECT_ALL = 1 << 2 ,
1421+ }
14081422}
14091423
14101424#[ repr( C ) ]
@@ -1891,6 +1905,7 @@ pub struct git_worktree_add_options {
18911905 pub version : c_uint ,
18921906 pub lock : c_int ,
18931907 pub reference : * mut git_reference ,
1908+ pub checkout_options : git_checkout_options ,
18941909}
18951910
18961911pub const GIT_WORKTREE_ADD_OPTIONS_VERSION : c_uint = 1 ;
@@ -3727,7 +3742,9 @@ extern "C" {
37273742 progress_cb : git_indexer_progress_cb ,
37283743 progress_cb_payload : * mut c_void ,
37293744 ) -> c_int ;
3745+ #[ deprecated = "use `git_packbuilder_name` to retrieve the filename" ]
37303746 pub fn git_packbuilder_hash ( pb : * mut git_packbuilder ) -> * const git_oid ;
3747+ pub fn git_packbuilder_name ( pb : * mut git_packbuilder ) -> * const c_char ;
37313748 pub fn git_packbuilder_foreach (
37323749 pb : * mut git_packbuilder ,
37333750 cb : git_packbuilder_foreach_cb ,
0 commit comments