File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ pub fn replace_changed_local_config_file(repo: &mut Repository, mut config: git_
4242/// HEAD cannot be written by means of refspec by design, so we have to do it manually here. Also create the pointed-to ref
4343/// if we have to, as it might not have been naturally included in the ref-specs.
4444pub fn update_head (
45- repo : & Repository ,
45+ repo : & mut Repository ,
4646 remote_refs : & [ git_protocol:: fetch:: Ref ] ,
4747 reflog_message : & BStr ,
4848 remote_name : & str ,
@@ -161,7 +161,7 @@ pub fn update_head(
161161/// is able to match it.
162162/// For that we reload the remote of `remote_name` and use its ref_specs for match.
163163fn setup_branch_config (
164- repo : & Repository ,
164+ repo : & mut Repository ,
165165 branch : & FullNameRef ,
166166 branch_id : Option < & git_hash:: oid > ,
167167 remote_name : & str ,
@@ -205,6 +205,7 @@ fn setup_branch_config(
205205 Some ( branch. as_bstr ( ) ) ,
206206 ) ;
207207 std:: fs:: write ( config_path, config. to_bstring ( ) ) ?;
208+ replace_changed_local_config_file ( repo, config) ;
208209 }
209210 Ok ( ( ) )
210211}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ mod blocking_io {
1111 use crate :: remote;
1212
1313 #[ test]
14- #[ ignore]
1514 fn fetch_only_with_configuration ( ) -> crate :: Result {
1615 let tmp = git_testtools:: tempfile:: TempDir :: new ( ) ?;
1716 let called_configure_remote = std:: sync:: Arc :: new ( std:: sync:: atomic:: AtomicBool :: default ( ) ) ;
@@ -145,8 +144,7 @@ mod blocking_io {
145144 ) ;
146145 assert_eq ! (
147146 repo. branch_remote_ref( short_name. as_ref( ) ) . expect( "present" ) ?. as_bstr( ) ,
148- remote_name,
149- "the remote branch information is fully configured"
147+ "refs/heads/main"
150148 ) ;
151149
152150 {
You can’t perform that action at this time.
0 commit comments