Vscode: "Stage selected lines" in GIT view disabled

Created on 9 Feb 2016  路  12Comments  路  Source: microsoft/vscode

The "Stage selected lines" option in the "more" menu of the GIT view is always disabled (grayed out) after updating to 0.10.8.

bug git

Most helpful comment

@yashcr07 this action has been moved to the command palette

screen shot 2017-02-28 at 14 54 59

All 12 comments

@isidorn Are you sure this is ok? The action should only be enabled if the intersection between the editor selection and the changes is not empty.

Reopening for discussion.

Ok I reverted my change.
@jacek-dargiel do you have exact reproducable steps, since it is hard for us to repro this. If not I will keep an eye open since I know it happens seldomly

Oh, this is quite strange, yesterday I couldn't get it to work at all, the option was disabled all the time no matter what I did or how I made the selection. Today it works just fine.

Yeah it is funky, please keep an eye open and let us know if you see some pattern

Hi guy's. I think i have found a pattern. Here are the steps to reproduce:

  1. You will need at least two files with unstaged changes.
  2. In the git view, select the first unstaged file.
  3. Make a selection containing all changes in the file
  4. Select "Stage selected lines" from the menu. At this point all changes in this file have been staged, the file is moved to the "staged changes" section of the git view, the side-by-side view switches to the next file on the list. The selected area is retained from the previous file, although the content is changed.
  5. If you make a new selection containing changes in the second file, the "Stage selected lines" option is incorrectly disabled.

Those steps don't repro for me. Also, the part in which you mention

the side-by-side view switches to the next file on the list

is incorrect. The side-by-side view switches to the index version of that file, instead of the working file version.

Did not see this action disabled for quite some time -> closing until somebody sees it again (hopefully with steps)

I just experienced this. My "stage selected lines" option was grayed out for no apparent reason. I tried closing files & tabs, removing the changes and then trying again but no luck. Restarting Code fixed it. Now I am not able to reproduce it however, so this might not be useful information to you... :/

VS Code Version 1.7.1 (1.7.1)
macOS Sierra Version 10.12.1

I confess I also see it once evert couple of months -> let reopen and try to get steps

Has the option to stage selected lines been disabled ?
I am on v1.10.0 insiders
using Windows 10

vscode

@yashcr07 this action has been moved to the command palette

screen shot 2017-02-28 at 14 54 59

Git is now an extension and this command is a global workbench command which is always enabled -> closing

Was this page helpful?
0 / 5 - 0 ratings