gitui
gitui copied to clipboard
Side-by-side diff
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
Would love split view of diffs too. This is especially helpful on larger screens.
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
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):
I prefer side by side also. I use it here on GitHub.
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.
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
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: https://github.com/dandavison/delta/issues/1305
@rootex-
Check the response here: dandavison/delta#1305
not sure what you are getting at? its cool it mentions gitui 👍
@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):
Perhaps, I'd better create a separate feature request?
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
see https://github.com/extrawurst/gitui/issues/358
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.