Repository: vscode
Issue: Troublesome focus behavior after Ctrl+Enter to stage/commit changes when multiple repos are open. Could also be avoided by adding a Git command to stage/commit tracked changes in multiple (all) open repos at once
Labels: bug,scm

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.61.1
- OS Version:
Edition	Windows 10 Pro
Version	20H2
OS build	19042.1237
Experience	Windows Feature Experience Pack 120.2212.3530.0

STR:
This is a little hard to phrase concisely so let me give some background. There's a keyboard shortcut in VS Code, `git.push` that opens a dropdown menu from the command palette, which asks you if you want to push or force push. Either way it pushes all repositories you have open. Which is very useful for me since I often have 2 versions of a repo that I want to push at the same time; one private, one facing the web.

But the stage and commit commands don't work this way. When you use `git.commitAll` or `git.stageAll`, a different dropdown menu from the command palette asks you to choose a repository. Unless I have missed something, the commands can only do one repo at a time. And if I select repo #1 and hit enter, then use the command again, the top item in the menu will still be repo #2. So I have to press arrow key to get to repo #2. Of course it would be a big improvement if it chose the order of the menu based on which repos have unstaged changes or something. But better yet if there was just a command that would commit all at the same time.

Until a couple weeks ago I had a pretty good system. When I finished editing the code I'd just open the SCM sidebar, type a message into one of the repos' message box, copy and paste the message into the other box, then hit ctrl+enter to stage & commit. Once the commit went through, it would automatically move focus to the other textbox. In other words I could just hit ctrl+enter twice since it would automatically jump from one textbox to the other after a commit.

This was really nice too. But for some reason this feature has been removed. Now when I hit ctrl+enter, instead of focusing the next textbox, it focuses the "sync changes" button. So I would have to use the mouse instead of the keyboard. This would be a lot more accessible if it was just returned to the way it was before the sync changes button was added. The button is a nice addition but I don't think it should be stealing focus from the textboxes.

So basically the keyboard-friendly accessible behavior of jumping from one textbox to the next so the user could rapidly stage & commit changes is gone. And `git.commitAll` isn't much better. It can't commit multiple repos at once, and it doesn't seem to bother trying to figure out which repo actually has changes to stage or commit. Same for `git.stageAll`. The order of repos in the dropdown menu/palette seems to only care about which editor is active.

So just 1) hitting the command, 2) then hitting enter, then 3) repeating will just end up making a real commit followed by an empty commit, instead of staging and committing changes in all open repos. I think it should order the dropdown menu contextually, but it would be even better if there was just a command to actually stage & commit all tracked changes in all open repos. And the old ctrl+enter focus behavior would still be worth restoring even then.