Skip to content

Commit

Permalink
Add command to "Delete Branch (Local and Remote)";
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisgibby committed May 30, 2019
1 parent 2bebc2d commit d119883
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/git-plus-commands.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ getCommands = ->
commands.push ['git-plus:new-branch', 'Checkout New Branch', -> GitCheckoutNewBranch(repo)]
commands.push ['git-plus:delete-local-branch', 'Delete Local Branch', -> GitDeleteBranch(repo)]
commands.push ['git-plus:delete-remote-branch', 'Delete Remote Branch', -> GitDeleteBranch(repo, {remote: true})]
commands.push ['git-plus:delete-branch-local-and-remote', 'Delete Branch (Local and Remote)', -> GitDeleteBranch(repo).then -> GitDeleteBranch(repo, {remote: true})]
commands.push ['git-plus:cherry-pick', 'Cherry-Pick', -> GitCherryPick(repo)]
commands.push ['git-plus:diff', 'Diff', -> GitDiff(repo, file: currentFile)]
if atom.config.get('git-plus.experimental.diffBranches')
Expand Down
4 changes: 4 additions & 0 deletions lib/git-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ module.exports = {
"git-plus:delete-remote-branch": () => {
git.getRepo().then(repo => GitDeleteBranch(repo, { remote: true }));
},
"git-plus:delete-branch-local-and-remote": () => {
git.getRepo().then(repo => GitDeleteBranch(repo))
.then(repo => GitDeleteBranch(repo, { remote: true }));
},
"git-plus:cherry-pick": () => git.getRepo().then(repo => GitCherryPick(repo)),
"git-plus:diff": () => {
git.getRepo().then(repo => GitDiff(repo, { file: currentFile(repo) }));
Expand Down

0 comments on commit d119883

Please # to comment.