Commit dialog shows wrong branch after committing failed when new branch was specified
What steps will reproduce the problem?
- Make some changes, then right-click on a folder and choose "Git Commit" to open the Commit dialog
- Check the "new branch" checkbox
- Enter a branch name in the "Commit to:" textbox, for example
my-branch
- Enter a description
- Click the "Commit" button -- and now suppose that this operation fails, e.g. because a Git precommit hook returned a nonzero exit code.
- Fix that problem, then try again by clicking the "Commit" button on the (still open) Commit dialog
What is the expected output? What do you see instead?
The operation should complete successfully.
What version of TortoiseGit and Git are you using? On what operating system?
Instead, the "new branch" checkbox shows a warning saying that my-branch
already exists.
If you uncheck the "new branch" checkbox, then the "Commit to:" label shows the original branch (e.g. master
) instead of my-branch
. This is incorrect, because after successfully clicking the "Commit" button, you will find that your changes have indeed been committed to my-branch
, and it is now the current branch.
Tortoise Git version: 2.9.0.0
Edited by Sven Strickroth