-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a rename
subcommand for the branch
command.
#2699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Should I bother with snapshot tests for this? Thoughts? |
Yes, please. You can add some to |
Ok. I finally figured out cargo insta and I added tests. PTAL. |
This is really a simple change that does the following in a transaction: * Set the new branch name to point to the same commit as the old branch name. * Set the old branch name to point to no commit (hence deleting the old name). Before it starts, it confirms that the new branch name is not already in use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! Feel free to merge.
Yay! \o/ Thanks for the detailed and patient explanations. On to the next ;-) |
Summary
This is really a simple change that does the following in a transaction:
Before it starts, it confirms that the new branch name is not already in use.
Changes
Rename
variant toBranchSubcommands
enum.BranchRenameArgs
struct needed byBranchSubcommands::Rename
cmd_branch_rename
Fixed: #1457
Checklist
If applicable:
CHANGELOG.md