File tree 4 files changed +8
-1
lines changed
gitbutler-branch-actions/src
4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl VirtualBranchActions {
68
68
branch:: is_remote_branch_mergeable ( & ctx, branch_name) . map_err ( Into :: into)
69
69
}
70
70
71
- #[ instrument( skip( self , project) ) ]
71
+ #[ instrument( level = tracing :: Level :: DEBUG , skip( self , project) ) ]
72
72
pub fn list_virtual_branches (
73
73
& self ,
74
74
project : & Project ,
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ pub mod vbranch {
38
38
39
39
#[ derive( Debug , clap:: Subcommand ) ]
40
40
pub enum SubCommands {
41
+ /// Provide the current state of all applied virtual branches.
42
+ Status ,
41
43
/// Make the named branch the default so all worktree or index changes are associated with it automatically.
42
44
SetDefault {
43
45
/// The name of the new default virtual branch.
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ pub fn list(project: Project) -> Result<()> {
40
40
Ok ( ( ) )
41
41
}
42
42
43
+ pub fn status ( project : Project ) -> Result < ( ) > {
44
+ debug_print ( VirtualBranchActions . list_virtual_branches ( & project) ?)
45
+ }
46
+
43
47
pub fn unapply ( project : Project , branch_name : String ) -> Result < ( ) > {
44
48
let branch = branch_by_name ( & project, & branch_name) ?;
45
49
debug_print ( VirtualBranchActions . convert_to_real_branch ( & project, branch. id ) ?)
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ fn main() -> Result<()> {
20
20
args:: Subcommands :: Branch ( vbranch:: Platform { cmd } ) => {
21
21
let project = command:: prepare:: project_from_path ( args. current_dir ) ?;
22
22
match cmd {
23
+ Some ( vbranch:: SubCommands :: Status ) => command:: vbranch:: status ( project) ,
23
24
Some ( vbranch:: SubCommands :: Unapply { name } ) => {
24
25
command:: vbranch:: unapply ( project, name)
25
26
}
You can’t perform that action at this time.
0 commit comments