Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Revert selected ranges' should work on individual lines, not hunks #88369

Open
georgefst opened this issue Jan 9, 2020 · 8 comments
Open

'Revert selected ranges' should work on individual lines, not hunks #88369

georgefst opened this issue Jan 9, 2020 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@georgefst
Copy link

  • VS Code version: Code 1.41.1 (26076a4, 2019-12-18T15:04:31.999Z)
  • OS version: Linux x64 4.15.0-72-generic (Ubuntu 16)
  • Does this issue occur when all extensions are disabled?: Yes

Revert selected ranges reverts any hunks in which there is a cursor. This is annoying when one wants more fine-grained control. Especially seeing as it is already easy to revert by hunk through other features.

Note that this is contrary to Stage selected ranges, which correctly stages only the selected lines

@connor4312 connor4312 added the git GIT issues label Jan 9, 2020
@joaomoreno
Copy link
Member

Revert selected ranges reverts any hunks in which there is a cursor.

I don't understand why this is annoying. This is exactly what it should be doing... Did you make a typo?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Jan 14, 2020
@georgefst
Copy link
Author

You might have made two unrelated changes on adjacent lines, and only want to revert one of them. With hunks, you lose this granularity. Besides, it's inconsistent with Stage selected ranges.

@joaomoreno joaomoreno changed the title 'Revert selected ranges' doesn't revert selected ranges. 'Revert selected ranges' doesn't revert single lines, only hunks Jan 15, 2020
@joaomoreno joaomoreno added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Jan 15, 2020
@joaomoreno joaomoreno added this to the Backlog milestone Jan 15, 2020
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Jan 15, 2020
@joaomoreno joaomoreno changed the title 'Revert selected ranges' doesn't revert single lines, only hunks 'Revert selected ranges' should work on individual lines, not hunks Jan 15, 2020
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Jan 15, 2020
@kumaran-14
Copy link

@joaomoreno I'd like to work on this. What would be the things I should be looking at?

@joaomoreno
Copy link
Member

I would start around here:

async revertSelectedRanges(changes: LineChange[]): Promise<void> {

@georgefst
Copy link
Author

Any progress here? This is still something that would improve my life immeasurably.

@bg-bi
Copy link

bg-bi commented Oct 19, 2020

I would also like this very much. What is the status?

@ctf0
Copy link

ctf0 commented Dec 11, 2020

having the same issue #112290

@artamonovoleg
Copy link

artamonovoleg commented Jan 6, 2024

Is there any updates on this? This issue prevents me from using vscode git integration

@joaomoreno joaomoreno removed their assignment Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants