Skip to content

Side-by-side diff #1294

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

Open
hgezim opened this issue Aug 24, 2022 · 11 comments
Open

Side-by-side diff #1294

hgezim opened this issue Aug 24, 2022 · 11 comments
Labels
feature-request nostale immune to stale-bot

Comments

@hgezim
Copy link

hgezim commented Aug 24, 2022

Is your feature request related to a problem? Please describe.

Any interest in adding a side-by-side diff view?

Describe the solution you'd like

I'm a huge fan of GitUp but can't use it due to my code being on a remote (Linux) machine. Something like this would be great: https://github.com/git-up/GitUp#complete-example-2-gitdiff

@xJonathanLEI
Copy link

Would love split view of diffs too. This is especially helpful on larger screens.

@extrawurst extrawurst added the nostale immune to stale-bot label Oct 23, 2022
@extrawurst
Copy link
Collaborator

For sure a thing planned. It will be something I want to tackle by getting rid of using the libgit2 based diffing and basically using a third party crate to do the diffing of arbitrary buffers. like for example difftastic or delta

@rootex-
Copy link

rootex- commented Dec 9, 2022

It would be also great to have ability to move small pieces of diff-code from right to left diff and vice-versa like IntelliJ IDEA does. Very convenient and very rare feature.
Screenshot shows this (you can see arrows like >> and << for moving code):
ij_compareFiles

@joyously
Copy link

joyously commented Dec 9, 2022

I prefer side by side also. I use it here on GitHub.
Minor refactors and deduplications by alexmaco · Pull Request 1411 · extrawurstgitui-07

As for gitui providing an editor to merge from the diff, I think that's out of scope. It's not that rare. Try Diffuse or Meld or Beyond Compare.

@zrock-dev
Copy link

Have you considered using delta for the side-by-side view?

I like a lot how it looks and I was wondering if is possible to integrate it, or if there is a way to use it with gitui.

https://github.com/dandavison/delta

@rootex-
Copy link

rootex- commented Feb 21, 2023

I've checked out delta and also created a feature request there. They offered to use gitui for this:

"Well, the description states that Delta is "a syntax-highlighting pager for git, diff, and grep output". It is not meant to change the code or to stage files. For that purpose, I would suggest GitUI, which is also written in Rust."

Check the response here: dandavison/delta#1305

@extrawurst
Copy link
Collaborator

@rootex-

Check the response here: dandavison/delta#1305

not sure what you are getting at? its cool it mentions gitui 👍

@rootex-
Copy link

rootex- commented Feb 21, 2023

@rootex-

Check the response here: dandavison/delta#1305

not sure what you are getting at?

@extrawurst I meant a feature that allows to apply hunks in side-by-side diff view (e.g. to apply a hunk from the left pane to the right pane (IntelliJ IDEA UI uses arrow >> for this)), described in this thread:

It would be also great to have ability to move small pieces of diff-code from right to left diff and vice-versa like IntelliJ IDEA does. Very convenient and very rare feature.
Screenshot shows this (you can see arrows like >> and << for moving code):
206687098-f7262ef1-38a6-4c9a-b960-7992a2c8afae

Perhaps, I'd better create a separate feature request?

@extrawurst
Copy link
Collaborator

no need to create a separate ticket. providing a different way to visualise a diff will not change the ways it allows you to stage/unstage/reset changes in it

@extrawurst
Copy link
Collaborator

see #358

@cherio
Copy link

cherio commented Nov 13, 2023

vimdiff already has a mature side-by-side diff implementation. Could it be leveraged? It comes with vim so it would be a pretty safe bet to assume it is already installed in a dev/server environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request nostale immune to stale-bot
Projects
None yet
Development

No branches or pull requests

7 participants