vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Display Hunks in Source Control Tree

Open GitClickOk opened this issue 5 years ago • 4 comments

I posted this request in VsCode (https://github.com/microsoft/vscode/issues/97754), but it was closed because it is "is great for a VS Code extension". Well, I think it can be nice for GitLens, so here is:

When working with Git in an existing repo, rarely I stage entire files, most of time I work staging hunks of data. It's awesome because I can review each single line of code I have worked.

In SourceTree, we can easily see hunks like this: Hunks in SourceTree

In VsCode, in order to stage/discard hunks we need deal with gutters directly in source file... I want to suggest add hunks in Source Control Tree like this: Hunks Feature Request With options to view, stage and discard hunks directly from Source Control Tree.

GitClickOk avatar May 14 '20 17:05 GitClickOk

I am trying to migrate to VS Code from Atom and I was looking all over for a way to stage hunks instead of files as that is the way I too stage.

wagnerone avatar May 22 '20 12:05 wagnerone

Interesting idea, unfortunately GitLens can't add anything to the source control view as you'd mocked up there (the VS Code APIs don't allow for anything like that).

But there are alternative ways of providing something like this.

While this isn't something that I will likely add myself anytime soon, if the community wants to champion it, and provide a PR (after discussions) I'm certainly open to it — depending, of course, on the complexity and scope of the changes involved.

eamodio avatar Dec 23 '20 09:12 eamodio

Very keen to have a more intuitive UI for staging (as sourcetree, fork, etc have)

samskiter avatar May 17 '23 19:05 samskiter

Sourcetree has had this for years, and its free....

cosier avatar Jun 06 '24 08:06 cosier

Came across this just now. Can't believe they're adding AI nonsense to this application, but basic source control functionality is still left much to be desired.

Can we please have hunk view already? I don't mean to be impatient, but do realise this feature request is five years old. I would almost file it as a bug report (missing feature can be considered a bug if it's a "bare minimum" type of feature), but I'll hold off for the moment.

thany avatar Mar 10 '25 15:03 thany