@@ -5,10 +5,10 @@ use crate::{IpcContext, error::Error};
5
5
use anyhow:: Context ;
6
6
use but_graph:: VirtualBranchesTomlMetadata ;
7
7
use but_hunk_assignment:: HunkAssignmentRequest ;
8
- use but_workspace:: commit_engine:: StackSegmentId ;
9
8
use but_workspace:: MoveChangesResult ;
9
+ use but_workspace:: commit_engine:: StackSegmentId ;
10
10
use but_workspace:: { commit_engine, ui:: StackEntry } ;
11
- use gitbutler_branch_actions:: { update_workspace_commit , BranchManagerExt } ;
11
+ use gitbutler_branch_actions:: { BranchManagerExt , update_workspace_commit } ;
12
12
use gitbutler_command_context:: CommandContext ;
13
13
use gitbutler_oplog:: entry:: { OperationKind , SnapshotDetails } ;
14
14
use gitbutler_oplog:: { OplogExt , SnapshotExt } ;
@@ -28,18 +28,20 @@ pub struct StacksParams {
28
28
pub filter : Option < but_workspace:: StacksFilter > ,
29
29
}
30
30
31
- pub fn stacks (
32
- ipc_ctx : & IpcContext ,
33
- params : StacksParams ,
34
- ) -> Result < Vec < StackEntry > , Error > {
31
+ pub fn stacks ( ipc_ctx : & IpcContext , params : StacksParams ) -> Result < Vec < StackEntry > , Error > {
35
32
let project = gitbutler_project:: get ( params. project_id ) ?;
36
33
let ctx = CommandContext :: open ( & project, ipc_ctx. app_settings . get ( ) ?. clone ( ) ) ?;
37
34
let repo = ctx. gix_repo_for_merging_non_persisting ( ) ?;
38
35
if ctx. app_settings ( ) . feature_flags . ws3 {
39
36
let meta = ref_metadata_toml ( ctx. project ( ) ) ?;
40
37
but_workspace:: stacks_v3 ( & repo, & meta, params. filter . unwrap_or_default ( ) )
41
38
} else {
42
- but_workspace:: stacks ( & ctx, & project. gb_dir ( ) , & repo, params. filter . unwrap_or_default ( ) )
39
+ but_workspace:: stacks (
40
+ & ctx,
41
+ & project. gb_dir ( ) ,
42
+ & repo,
43
+ params. filter . unwrap_or_default ( ) ,
44
+ )
43
45
}
44
46
. map_err ( Into :: into)
45
47
}
@@ -51,10 +53,7 @@ pub struct ShowGraphSvgParams {
51
53
}
52
54
53
55
#[ cfg( unix) ]
54
- pub fn show_graph_svg (
55
- ipc_ctx : & IpcContext ,
56
- params : ShowGraphSvgParams ,
57
- ) -> Result < ( ) , Error > {
56
+ pub fn show_graph_svg ( ipc_ctx : & IpcContext , params : ShowGraphSvgParams ) -> Result < ( ) , Error > {
58
57
let project = gitbutler_project:: get ( params. project_id ) ?;
59
58
let ctx = CommandContext :: open ( & project, ipc_ctx. app_settings . get ( ) ?. clone ( ) ) ?;
60
59
let repo = ctx. gix_repo_minimal ( ) ?;
@@ -149,7 +148,12 @@ pub fn branch_details(
149
148
. map_err ( anyhow:: Error :: from) ?;
150
149
but_workspace:: branch_details_v3 ( & repo, ref_name. as_ref ( ) , & meta)
151
150
} else {
152
- but_workspace:: branch_details ( & project. gb_dir ( ) , & params. branch_name , params. remote . as_deref ( ) , & ctx)
151
+ but_workspace:: branch_details (
152
+ & project. gb_dir ( ) ,
153
+ & params. branch_name ,
154
+ params. remote . as_deref ( ) ,
155
+ & ctx,
156
+ )
153
157
}
154
158
. map_err ( Into :: into)
155
159
}
@@ -620,4 +624,4 @@ pub fn target_commits(
620
624
params. page_size . unwrap_or ( 30 ) ,
621
625
)
622
626
. map_err ( Into :: into)
623
- }
627
+ }
0 commit comments