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

Add a diff view #4523

Open
1 task done
hferreiro opened this issue Aug 23, 2023 · 38 comments
Open
1 task done

Add a diff view #4523

hferreiro opened this issue Aug 23, 2023 · 38 comments
Labels
enhancement [core label] git Git integration feedback priority A high priority issue

Comments

@hferreiro
Copy link
Contributor

hferreiro commented Aug 23, 2023

Check for existing issues

  • Completed

Describe the feature

Add support for showing the diff between different files, similarly to VSCode's code -d/--diff.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@dangh
Copy link

dangh commented Aug 23, 2023

I would love it too. Zed is a great editor. Lately I've been using it as a terminal app (a window with just center terminal views) and it works fantastic too. A proper git support and I can have everything in one application.

@Spoutnik97
Copy link

Hi!
I found a great article to have a feature near to what you want : https://spin.atomicobject.com/fuzzy-find-git-add/

TLDR: use fzf to list changed files and add them to the git HEAD

Try the following command : git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 -o -t git add

@alioshr
Copy link

alioshr commented Feb 26, 2024

Any progress or ETA to start working on this?

@savoygrizzly
Copy link

While adding a diff viewer, might be nice to add some sort of git quick ui actions somewhere, I love that in vscode I don't have to open up a terminal to push my changes to the remote.
Also as many stated, new files and folder highlight would be nice.

@Moshyfawn
Copy link
Member

Moshyfawn commented Feb 28, 2024

While adding a diff viewer, might be nice to add some sort of git quick ui actions somewhere, I love that in vscode I don't have to open up a terminal to push my changes to the remote.

There's a separate feature request for the source control panel #4367

Also as many stated, new files and folder highlight would be nice.

I believe the basic highlighting of committed vs new files and folders is already in the latest Zed build.

@savoygrizzly
Copy link

It doesnt seem to work with nested git (say I have a root docker composer with 2 folders for services each tracked independently), it will only track newly created files for the top level git.

Nevertheless I just switched from vscode, love what you've been doing and even on a big machine you can feel the responsiveness difference. Awesome job guys !

@Moshyfawn
Copy link
Member

It doesnt seem to work with nested git (say I have a root docker composer with 2 folders for services each tracked independently), it will only track newly created files for the top level git.

I believe it's tracked in #8275.

Nevertheless I just switched from vscode, love what you've been doing and even on a big machine you can feel the responsiveness difference. Awesome job guys !

💜

@Chimpaya
Copy link

Chimpaya commented Mar 1, 2024

Pumping this again. The only thing keeping me from switching is the lack of git diff UI, like in VSCode. Would love to have it.

@mrnugget
Copy link
Member

mrnugget commented Mar 4, 2024

@Chimpaya to clarify: what do you mean with git diff UI exactly? That you can click on a modified file and see a diff of changes in current branch, or the ability to open any diff/patch and have it properly formatted? (I know that this question sounds like it has an obvious answer, but I do think there's some nuance here)

@Chimpaya
Copy link

Chimpaya commented Mar 4, 2024

@Chimpaya to clarify: what do you mean with git diff UI exactly? That you can click on a modified file and see a diff of changes in current branch, or the ability to open any diff/patch and have it properly formatted? (I know that this question sounds like it has an obvious answer, but I do think there's some nuance here)

I mean a built-in source control panel like they have in VScode.

@Moshyfawn
Copy link
Member

I mean a built-in source control panel like they have in VScode.

This is a different feature you're describing, which is discussed in #4367.

@wescopeland
Copy link

@mrnugget

[the ability to] click on a modified file and see a diff of changes in current branch

This is what I'm looking for and is probably the only thing keeping me from switching to Zed from VSCode.

@jimmycallin
Copy link

jimmycallin commented Mar 4, 2024

@Chimpaya to clarify: what do you mean with git diff UI exactly? That you can click on a modified file and see a diff of changes in current branch, or the ability to open any diff/patch and have it properly formatted? (I know that this question sounds like it has an obvious answer, but I do think there's some nuance here)

I would also like to be able to compare any two files, or even two unsaved windows/tabs. Sometimes I paste some content into VSCode in two separate tabs and use its diff view to view what's different between them.

@SichangHe
Copy link

I recommend referencing IntelliJ's Git diff, the best I've seen.

@zarifpour
Copy link

Pumping this again. The only thing keeping me from switching is the lack of git diff UI, like in VSCode. Would love to have it.

I'm currently using this as a workaround: https://github.com/extrawurst/gitui

GHxXMgkXgAAVVoA

@Spoutnik97
Copy link

An alternative to your proposition : https://github.com/bigH/git-fuzzy to combine with delta : https://github.com/dandavison/delta

@savoygrizzly
Copy link

The Git diff and general integration could be better, I can see that as one of the major reasons people will keep using vscode. I ended up using the official GitHub Desktop app to be able to have an overview of changes made (files edited, files added, files removed).
Having some sort of UI for that like vscode does really is a necessity.

@JosephTLyons JosephTLyons added the priority A high priority issue label Mar 10, 2024
@mkismy
Copy link

mkismy commented Mar 12, 2024

I loved how Atom handled the git stuff - commit, amend, push and so on. I just can't get used to how vscode does it.

@krisidmisso
Copy link

I would love to see this to resolve conflicts: https://www.jetbrains.com/help/webstorm/resolving-conflicts.html#distributed-version-control-systems

@htor
Copy link

htor commented Mar 17, 2024

While I definitely support the feature request for a diff function, it will not be sufficient alone to provide a useful version control experience. One would also need branching, staging, committing, pushing, pulling, resolving merge conflicts, history and more.

What I really like about Intellij is its three-way merge panel for resolving conflicts.

@mrnugget
Copy link
Member

Just in case some of you haven't seen it, here's the tracking issue for git integration: #8665

@saxenanickk
Copy link

I am currently using lazygit.

lazygit

SomeoneToIgnore added a commit that referenced this issue May 1, 2024
Part of #4523

Added two new actions with the default keybindings

```
"cmd-'": "editor::ToggleHunkDiff",
"cmd-\"": "editor::ExpandAllHunkDiffs",
```

that allow to browse git hunk diffs in Zed:


https://github.com/zed-industries/zed/assets/2690773/9a8a7d10-ed06-4960-b4ee-fe28fc5c4768


The hunks are dynamic and alter on user folds and modifications, or
toggle hidden, if the modifications were not adjacent to the expanded
hunk.


Release Notes:

- Added `editor::ToggleHunkDiff` (`cmd-'`) and
`editor::ExpandAllHunkDiffs` (`cmd-"`) actions to browse git hunk diffs
in Zed
@debkanchan
Copy link

Me and the homies waiting for diff view to drop to finally ditch VSCode

image

@savoygrizzly
Copy link

I ditched vscode, but It makes me sad to have to open it to get an editable diff view for conflicts.

Zed guys you gotta pick up the pace, zed needs qol's asap.

@asesh
Copy link

asesh commented May 21, 2024

Zed really needs this feature. Just look at how VS Code handles the diffs.

@luolong
Copy link

luolong commented May 28, 2024

Diff/merge view/editor would be nice.

While we're at it, could I suggest getting a leg up on all the other editors in this department and making use of semantic diff as implemented by Difftastic for example?

I use it all the time on terminal and it is just incredibly useful!

@Moshyfawn
Copy link
Member

Moshyfawn commented May 28, 2024

While we're at it, could I suggest getting a leg up on all the other editors in this department and making use of semantic diff as implemented by Difftastic for example?

Be sure to +👍 this other issue 😉

@Sam-Archie
Copy link

If there was a git diff view this would 100% be my main editor.

@nervenes
Copy link
Contributor

Any update on this?

@Moshyfawn
Copy link
Member

Any update on this?

#8665 (comment)

@alioshr
Copy link

alioshr commented Jun 17, 2024

Would be nice to see a plan for this, or at least a plan to plan/discuss it. In terms of capacity it is not fair to keep comparing on "how vsCode does it", as it is backed up by a major company. But on the other hand it should be feasible to plan this, or present a roadmap to have this integrated/decided/discussed =)

Congrats by the super IDE and I hope it supports plugins in the future + view diff. On its core, being written in Rust, it will be for sure much superior to its competitors in terms of memory efficiency and performance =)

@baldwindavid
Copy link
Contributor

baldwindavid commented Jun 17, 2024

@alioshr The message right above yours links to something of a plan, no?

This comment is the latest update to the tracking issue for git integration #8665 which also lays out plans/milestones.

If, however, you're saying more of a BDUF, my perception as an outsider is that this project is not run that way. There are general objectives and goals and those typically seem to be tackled via initial experiments / pocs that are iterated upon and adjusted based upon feedback and learnings along the way. Also my experience that once they move on a specific feature it tends to move along rather quickly, gets to an mvp delivering most of the value, let the feedback flow for awhile, and perhaps shift for awhile to other higher priorities. Rinse and repeat.

@alioshr
Copy link

alioshr commented Jun 17, 2024

@baldwindavid oh great. Yeah it seems to be exactly the minimum of feedback I was expecting to find. I did not click on the link to be honest. Quite fresh from last week. Great news and thanks for explaining what the link is. The alias of the link is not very intuitive =)

@42piratas
Copy link

Please!!!

@krisidmisso
Copy link

This is 1 of 2 missing features that is keeping me attached to Jetbrains:
ws_conflict_resolution_tool_legend_dark.png

Please!

@ChzenChzen
Copy link

we are waiting.... pleaaase

@notpeter notpeter mentioned this issue Jul 19, 2024
1 task
@kfelter
Copy link

kfelter commented Jul 25, 2024

Hello I am here, asking very nicely to the very smart and beautiful devs to please add diff view.

@mrnugget
Copy link
Member

Hey folks! Since 26+ people are getting notified every time someone says that they'd love to have this feature and we have (right now) 801 upvote-emojis — I'm going to lock the issue for now. We know it's requested :)

@zed-industries zed-industries locked as off-topic and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement [core label] git Git integration feedback priority A high priority issue
Projects
None yet
Development

No branches or pull requests