Vscode: Commit commits the whole file, not only selected ranges

Created on 15 Feb 2018  路  9Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.20.0
  • OS Version: Sierra 10.12.6

Steps to Reproduce:

  1. Make some changes to different files of your code.
  2. Add all changes from one file for commit.
  3. Use stage selected ranges to add only some lines of code of another file for commit.
  4. Commit.
  5. See that the whole file, from which you selected only certain scopes, got committed.


Does this issue occur when all extensions are disabled?: Yes/No

git needs more info

Most helpful comment

In my case this issue was caused by lint-staged . More information about that issue can be found here: https://github.com/okonet/lint-staged/issues/62#issuecomment-359234601
@niklas-e and @LAITONEN can you try to delete that property from your package.json and see if this problem still occurs?

All 9 comments

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

cc @chrmarti for bad bot suggestions

@LAITONEN Do you mind sending a screen recording of what you observe?

This has happened a few times. I'm not sure how to repro as it seems to happen quite randomly. Though I think it's usually occurring when I have to select ranges from multiple sections.

I have also noticed after it has happened and I'm trying to undo the commit and then retry the range selection process, it occurs again. So basically I cannot do the range selection at all when this has occurred.

OS Version: Windows 10 Pro, 1709 (16299.248)
VSCode version: 1.20.0

@niklas-e Since it reproduces afterwards, can you record a screencast and show me?

@joaomoreno sure thing, I'll try to remember to record it next time.

In my case this issue was caused by lint-staged . More information about that issue can be found here: https://github.com/okonet/lint-staged/issues/62#issuecomment-359234601
@niklas-e and @LAITONEN can you try to delete that property from your package.json and see if this problem still occurs?

Solution of @SamiEklund works. I am closing the issue. Thank you all!

Excellent, thank you!

Was this page helpful?
0 / 5 - 0 ratings