Vscode: Git: Illegal value for `line`

Created on 29 May 2018  路  15Comments  路  Source: microsoft/vscode

image

  • VSCode Version: 2.8.3
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open Source Control
    image
  1. Select file
    image

  2. Select range
    image

  3. Click 3 dots in upper right corner, then click "Stage Selected Range"
    image

Result:
image

What am I doing wrong?

bug git good first issue help wanted verified

Most helpful comment

I can reproduce this issue. If there is a deletion at the end of the file (last line) I get the same error message.

Version 1.25.1
OS: macOS Sierra 10.12.6
Using git 2.18.0 from /usr/local/bin/git

All 15 comments

Does this happen with ANY range you select? If not, please provide the exact file contents and describe exactly whats the selection range you are using.

Any range from this file: 'page-recent-orders.component.ts'. However, when I select a range from the other files it work as expected. I can commit all the changes in the file in one commit, but I wanted to put them in different commits. Is there a way I could send this file to you privately?

Yeah: joao dot moreno at microsoft

It's my email.

@joaomoreno Can you please guide me , I am wanted to take this for fixing

@joaomoreno can you please help me I wanted to take a look on this bug

@offg777 @joaomoreno I am not able to reproduce this issue

Same problem here:
Version 1.24.1
OS: macOS High Sierra 10.13.5

I'm trying to stage specific changes for a file in git repo.

I'm not positive how general this reproduction is but I found a pretty consistent means of reproducing it for one file I'm working on at the moment. If I have changes in the middle of the file, and the also a change at the end of the file where I delete a trailing blank line, if I try to stage the earlier changed lines but not the last deleted line change I get the Git: illegal value for 'line'

deletelastline

I can reproduce this issue. If there is a deletion at the end of the file (last line) I get the same error message.

Version 1.25.1
OS: macOS Sierra 10.12.6
Using git 2.18.0 from /usr/local/bin/git

I'm having the same problem. Adding a new line at the end of the file seems to circumvent the issue.

Facing the same issue. Not able to stage a deleted line.

Something like this would be awesome.

2018-08-11_22-58-38

Can confirm that a deleted line at the end of the file causes this issue.

Version 1.26.1
OS: macOS High Sierra 10.13.6

I'm a bit late to the party, but yes, a removed linebreak at the end of the file it is.

Version: 1.27.1 (user setup)
Commit: 5944e81f3c46a3938a82c701f96d7a59b074cfdc
Datum: 2018-09-06T09:21:18.328Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architektur: x64
Was this page helpful?
0 / 5 - 0 ratings