File tree Expand file tree Collapse file tree 7 files changed +13
-35
lines changed
gitbutler-branch-actions/src Expand file tree Collapse file tree 7 files changed +13
-35
lines changed Original file line number Diff line number Diff line change @@ -357,10 +357,7 @@ impl Graph {
357
357
let target = ws_meta. target_ref . as_ref ( ) . and_then ( |trn| {
358
358
let tid = try_refname_to_id ( repo, trn. as_ref ( ) )
359
359
. map_err ( |err| {
360
- tracing:: warn!(
361
- "Ignoring non-existing target branch {trn}: {err}" ,
362
- trn = trn. as_bstr( )
363
- ) ;
360
+ tracing:: warn!( "Ignoring non-existing target branch {trn}: {err}" ) ;
364
361
err
365
362
} )
366
363
. ok ( ) ??;
Original file line number Diff line number Diff line change @@ -624,15 +624,13 @@ pub fn obtain_workspace_infos<T: RefMetadata>(
624
624
for ( rn, data) in workspaces {
625
625
if rn. category ( ) != Some ( Category :: LocalBranch ) {
626
626
tracing:: warn!(
627
- "Skipped workspace at ref {} as workspaces can only ever be on normal branches" ,
628
- rn. as_bstr( )
627
+ "Skipped workspace at ref {rn} as workspaces can only ever be on normal branches" ,
629
628
) ;
630
629
continue ;
631
630
}
632
631
if target_refs. contains ( & rn) {
633
632
tracing:: warn!(
634
- "Skipped workspace at ref {} as it was also a target ref for another workspace (or for itself)" ,
635
- rn. as_bstr( )
633
+ "Skipped workspace at ref {rn} as it was also a target ref for another workspace (or for itself)" ,
636
634
) ;
637
635
continue ;
638
636
}
@@ -642,16 +640,13 @@ pub fn obtain_workspace_infos<T: RefMetadata>(
642
640
. filter ( |trn| trn. category ( ) != Some ( Category :: RemoteBranch ) )
643
641
{
644
642
tracing:: warn!(
645
- "Skipped workspace at ref {} as its target reference {target} was not a remote tracking branch" ,
646
- rn. as_bstr( ) ,
647
- target = invalid_target_ref. as_bstr( ) ,
643
+ "Skipped workspace at ref {rn} as its target reference {invalid_target_ref} was not a remote tracking branch" ,
648
644
) ;
649
645
continue ;
650
646
}
651
647
let Some ( ws_tip) = try_refname_to_id ( repo, rn. as_ref ( ) ) ? else {
652
648
tracing:: warn!(
653
- "Ignoring stale workspace ref '{ws_ref}', which didn't exist in Git but still had workspace data" ,
654
- ws_ref = rn. as_bstr( )
649
+ "Ignoring stale workspace ref '{rn}', which didn't exist in Git but still had workspace data" ,
655
650
) ;
656
651
continue ;
657
652
} ;
Original file line number Diff line number Diff line change @@ -1060,8 +1060,7 @@ impl Workspace<'_> {
1060
1060
}
1061
1061
if !found_segment {
1062
1062
tracing:: error!(
1063
- "BUG: Couldn't find local segment with remote tracking ref '{rn}' - remote commits for it seem to be missing" ,
1064
- rn = remote_tracking_ref_name. as_bstr( )
1063
+ "BUG: Couldn't find local segment with remote tracking ref '{remote_tracking_ref_name}' - remote commits for it seem to be missing" ,
1065
1064
) ;
1066
1065
}
1067
1066
}
Original file line number Diff line number Diff line change @@ -208,11 +208,7 @@ impl std::fmt::Debug for Outcome {
208
208
Some ( edits) => edits
209
209
. last ( )
210
210
. map ( |edit| {
211
- format ! (
212
- "Update {} to {:?}" ,
213
- edit. name. as_bstr( ) ,
214
- edit. change. new_value( )
215
- )
211
+ format ! ( "Update {} to {:?}" , edit. name, edit. change. new_value( ) )
216
212
} )
217
213
. unwrap_or_default ( ) ,
218
214
} ,
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ pub fn branch_details_v3(
168
168
. last ( )
169
169
. map ( |id| id. detach ( ) )
170
170
. unwrap_or_else ( || {
171
- tracing:: warn!( "No merge-base found between {name} and the integration branch {integration_branch_name}" , name = name . as_bstr ( ) ) ;
171
+ tracing:: warn!( "No merge-base found between {name} and the integration branch {integration_branch_name}" ) ;
172
172
// default to the tip just like the code previously did, resulting in no information
173
173
// TODO: we should probably indicate that there is no merge-base instead of just glossing over it.
174
174
branch_id. detach ( )
Original file line number Diff line number Diff line change @@ -46,16 +46,10 @@ impl RemoteTrackingReference {
46
46
remote_names : & gix:: remote:: Names ,
47
47
) -> anyhow:: Result < Self > {
48
48
let ( category, short_name) = ref_name. category_and_short_name ( ) . with_context ( || {
49
- format ! (
50
- "Failed to categorize presume remote reference '{}'" ,
51
- ref_name. as_bstr( )
52
- )
49
+ format ! ( "Failed to categorize presume remote reference '{ref_name}'" )
53
50
} ) ?;
54
51
if category != Category :: RemoteBranch {
55
- bail ! (
56
- "Expected '{}' to be a remote tracking branch, but was {category:?}" ,
57
- ref_name. as_bstr( )
58
- ) ;
52
+ bail ! ( "Expected '{ref_name}' to be a remote tracking branch, but was {category:?}" ) ;
59
53
}
60
54
let ( longest_remote, short_name) = remote_names
61
55
. iter ( )
@@ -76,10 +70,7 @@ impl RemoteTrackingReference {
76
70
"Failed to find remote branch's corresponding remote"
77
71
) )
78
72
. with_context ( || {
79
- format ! (
80
- "Remote reference '{}' couldn't be matched with any known remote" ,
81
- ref_name. as_bstr( )
82
- )
73
+ format ! ( "Remote reference '{ref_name}' couldn't be matched with any known remote" )
83
74
} ) ?;
84
75
85
76
Ok ( RemoteTrackingReference {
Original file line number Diff line number Diff line change @@ -323,9 +323,9 @@ fn branch_group_to_branch(
323
323
let head_commit = if let Some ( vbranch) = virtual_branch {
324
324
Some ( vbranch. head_oid ( repo) ?)
325
325
} else if let Some ( mut branch) = local_branches. into_iter ( ) . next ( ) {
326
- branch. peel_to_id_in_place_packed ( packed) . ok ( )
326
+ branch. peel_to_id_packed ( packed) . ok ( )
327
327
} else if let Some ( mut branch) = remote_branches. into_iter ( ) . next ( ) {
328
- branch. peel_to_id_in_place_packed ( packed) . ok ( )
328
+ branch. peel_to_id_packed ( packed) . ok ( )
329
329
} else {
330
330
None
331
331
}
You can’t perform that action at this time.
0 commit comments