File tree Expand file tree Collapse file tree 4 files changed +8
-1
lines changed
gitbutler-branch-actions/src Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl VirtualBranchActions {
6868 branch:: is_remote_branch_mergeable ( & ctx, branch_name) . map_err ( Into :: into)
6969 }
7070
71- #[ instrument( skip( self , project) ) ]
71+ #[ instrument( level = tracing :: Level :: DEBUG , skip( self , project) ) ]
7272 pub fn list_virtual_branches (
7373 & self ,
7474 project : & Project ,
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ pub mod vbranch {
3838
3939 #[ derive( Debug , clap:: Subcommand ) ]
4040 pub enum SubCommands {
41+ /// Provide the current state of all applied virtual branches.
42+ Status ,
4143 /// Make the named branch the default so all worktree or index changes are associated with it automatically.
4244 SetDefault {
4345 /// 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<()> {
4040 Ok ( ( ) )
4141}
4242
43+ pub fn status ( project : Project ) -> Result < ( ) > {
44+ debug_print ( VirtualBranchActions . list_virtual_branches ( & project) ?)
45+ }
46+
4347pub fn unapply ( project : Project , branch_name : String ) -> Result < ( ) > {
4448 let branch = branch_by_name ( & project, & branch_name) ?;
4549 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<()> {
2020 args:: Subcommands :: Branch ( vbranch:: Platform { cmd } ) => {
2121 let project = command:: prepare:: project_from_path ( args. current_dir ) ?;
2222 match cmd {
23+ Some ( vbranch:: SubCommands :: Status ) => command:: vbranch:: status ( project) ,
2324 Some ( vbranch:: SubCommands :: Unapply { name } ) => {
2425 command:: vbranch:: unapply ( project, name)
2526 }
You can’t perform that action at this time.
0 commit comments