[PATCH] branch: implement shortcut to delete last branch

2018-03-27 Thread Aaron Greenberg
git branch -d topic-a $ # With this patch, a user could simply type $ git branch -d - "-" is a useful shortcut for cleaning up a just-merged branch (or a just switched-from branch.) Signed-off-by: Aaron Greenberg <p...@aaronjgreenberg.com> --- builtin/branch.c | 3 +++ t/t3200-bra

[PATCH] branch: implement shortcut to delete last branch

2018-03-27 Thread Aaron Greenberg
With the approvals listed in [*1*] and in accordance with the guidelines set out in Documentation/SubmittingPatches, I am submitting this patch to be applied upstream. After work on this patch is done, I'll look into picking up where the prior work done in [*2*] left off. Is there anything else

[PATCH v2] branch: implement shortcut to delete last branch

2018-03-23 Thread Aaron Greenberg
I updated the commit message to include my first email's cover letter and cleaned up the test. Copying Junio, since he also had good comments in the conversation you linked. I can appreciate Matthieu's points on the use of "-" in destructive commands. As of this writing, git-merge supports the

[PATCH] branch: implement shortcut to delete last branch

2018-03-23 Thread Aaron Greenberg
git branch -d topic-a $ # With this patch, a user could simply type $ git branch -d - "-" is a useful shortcut for cleaning up a just-merged branch (or a just switched-from branch.) Signed-off-by: Aaron Greenberg <p...@aaronjgreenberg.com> --- builtin/branch.c | 3 +++ t/t3200-bra

[PATCH] branch: implement shortcut to delete last branch

2018-03-22 Thread Aaron Greenberg
Add support for using the "-" shortcut to delete the last checked-out branch. This functionality already exists for git-merge, git-checkout, and git-revert. Signed-off-by: Aaron Greenberg <p...@aaronjgreenberg.com> --- builtin/branch.c | 3 +++ t/t3200-branch.sh | 9 +

[PATCH] branch: implement shortcut to delete last branch

2018-03-22 Thread Aaron Greenberg
This patch gives git-branch the ability to delete the previous checked-out branch using the "-" shortcut. This shortcut already exists for git-checkout, git-merge, and git-revert. One of my common workflows is to do some work on a local topic branch and push it to a remote, where it gets merged in