File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ pub struct git_fetch_options {
402
402
pub version : c_int ,
403
403
pub callbacks : git_remote_callbacks ,
404
404
pub prune : git_fetch_prune_t ,
405
- pub update_flags : c_uint ,
405
+ pub update_fetchhead : c_uint ,
406
406
pub download_tags : git_remote_autotag_option_t ,
407
407
pub proxy_opts : git_proxy_options ,
408
408
pub depth : c_int ,
Original file line number Diff line number Diff line change @@ -613,11 +613,10 @@ impl<'cb> Binding for FetchOptions<'cb> {
613
613
. map ( |m| m. raw ( ) )
614
614
. unwrap_or_else ( || ProxyOptions :: new ( ) . raw ( ) ) ,
615
615
prune : crate :: call:: convert ( & self . prune ) ,
616
- // HACK: `libgit2` uses C bitfields, which do not have a guaranteed memory layout.
617
- // Reversing the bits ensures that the bitfields are set whether the bits are laid out
618
- // from left to right or right to left, but will not work on other memory layouts.
619
- update_flags : ( self . update_flags . bits ( ) | self . update_flags . bits ( ) . reverse_bits ( ) )
620
- as c_uint ,
616
+ // `update_fetchhead` is an incorrectly named option which contains both
617
+ // the `UPDATE_FETCHHEAD` and `REPORT_UNCHANGED` flags.
618
+ // See https://github.com/libgit2/libgit2/pull/6806
619
+ update_fetchhead : self . update_flags . bits ( ) as c_uint ,
621
620
download_tags : crate :: call:: convert ( & self . download_tags ) ,
622
621
depth : self . depth ,
623
622
follow_redirects : self . follow_redirects . raw ( ) ,
Original file line number Diff line number Diff line change @@ -25,9 +25,7 @@ fn main() {
25
25
// this field is marked as const which ctest complains about
26
26
( struct_ == "git_rebase_operation" && f == "id" ) ||
27
27
// the real name of this field is ref but that is a reserved keyword
28
- ( struct_ == "git_worktree_add_options" && f == "reference" ) ||
29
- // the `update_flags` field consists of 2 bitfields
30
- ( struct_ == "git_fetch_options" && f == "update_flags" )
28
+ ( struct_ == "git_worktree_add_options" && f == "reference" )
31
29
} ) ;
32
30
cfg. skip_signededness ( |s| match s {
33
31
s if s. ends_with ( "_cb" ) => true ,
You can’t perform that action at this time.
0 commit comments