Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Conversation

@RobBoeckermann
Copy link

Added "Branches" view.

Branches view displays all remote and local branches. The title has buttons for creating a new branch and refreshing the branches view. Right clicking branches allows for checking out the branch, deleting the branch, and merging the branch into the current branch. These actions are also accessible for manual entry with F1.

Known issues:
-Unable to delete a branch if it has not been fully merged. The uppercase "-D" flag must be used to do so, but I felt it best to leave the lowercase "-d" flag for now to prevent accidental deletion of a branch.
-Open files are not refreshed after checking out a different branch. The open files will still display the state of the previous branch and must be closed and re-opened to display their state on the current branch.

Rob B added 10 commits August 23, 2021 15:27
minor cleanup
updated checkout to allow checking out remote branches.
Refresh branches view after running command
Add 'checked out' description for active branch
Update README
Add branch icon
Refresh branches view after pushing so that pushed branch is displayed in remotes
…ate of the current branch.

Add newline to the end of files.
Add known TODOs
@worksofliam worksofliam self-requested a review August 27, 2021 00:52
@worksofliam
Copy link
Member

Will be reviewing this evening.

@worksofliam worksofliam self-assigned this Aug 27, 2021
@worksofliam
Copy link
Member

@RobBoeckermann This is great! What an awesome PR. Thanks for your great work here.

I've tested on some repos I have on my IBM i and it works fab.

Regarding this:

Unable to delete a branch if it has not been fully merged. The uppercase "-D" flag must be used to do so, but I felt it best to leave the lowercase "-d" flag for now to prevent accidental deletion of a branch.

I agree with you, but it might be worth doing something with the showWarningMessage API in VS Code. For example, you could do something like this:

let result = await vscode.window.showWarningMessage(`Are you sure you want to delete branch ${x}?`, `Yes`, `Cancel`);

if (result === `Yes`) {
  // delete branch here
}

Which could then force delete it.

I am happy with the changes. If you'd like to add this last bit, go ahead. Otherwise, let me know and I will get it merged and released over the weekend.

Delete Branch now force deleted branch even if the changes are unmerged
@RobBoeckermann
Copy link
Author

@worksofliam
Great idea. Thanks!
I have implemented the warning and tested it. It's ready to be merged.

@worksofliam
Copy link
Member

@RobBoeckermann Awesome!

I'm going to give it a try in the morning and I'll get it merged and released.

@worksofliam
Copy link
Member

@RobBoeckermann Great work friend.

I will merge and make a new release.

@worksofliam worksofliam merged commit 5396e43 into codefori:master Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants