File tree 2 files changed +4
-5
lines changed
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_
42
42
/// HEAD cannot be written by means of refspec by design, so we have to do it manually here. Also create the pointed-to ref
43
43
/// if we have to, as it might not have been naturally included in the ref-specs.
44
44
pub fn update_head (
45
- repo : & Repository ,
45
+ repo : & mut Repository ,
46
46
remote_refs : & [ git_protocol:: fetch:: Ref ] ,
47
47
reflog_message : & BStr ,
48
48
remote_name : & str ,
@@ -161,7 +161,7 @@ pub fn update_head(
161
161
/// is able to match it.
162
162
/// For that we reload the remote of `remote_name` and use its ref_specs for match.
163
163
fn setup_branch_config (
164
- repo : & Repository ,
164
+ repo : & mut Repository ,
165
165
branch : & FullNameRef ,
166
166
branch_id : Option < & git_hash:: oid > ,
167
167
remote_name : & str ,
@@ -205,6 +205,7 @@ fn setup_branch_config(
205
205
Some ( branch. as_bstr ( ) ) ,
206
206
) ;
207
207
std:: fs:: write ( config_path, config. to_bstring ( ) ) ?;
208
+ replace_changed_local_config_file ( repo, config) ;
208
209
}
209
210
Ok ( ( ) )
210
211
}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ mod blocking_io {
11
11
use crate :: remote;
12
12
13
13
#[ test]
14
- #[ ignore]
15
14
fn fetch_only_with_configuration ( ) -> crate :: Result {
16
15
let tmp = git_testtools:: tempfile:: TempDir :: new ( ) ?;
17
16
let called_configure_remote = std:: sync:: Arc :: new ( std:: sync:: atomic:: AtomicBool :: default ( ) ) ;
@@ -145,8 +144,7 @@ mod blocking_io {
145
144
) ;
146
145
assert_eq ! (
147
146
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"
150
148
) ;
151
149
152
150
{
You can’t perform that action at this time.
0 commit comments