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

A better diff viewer - Diff2HTML support #742

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

homsai
Copy link

@homsai homsai commented Feb 22, 2023

Dear developers,

I am a long-time SourceTree user and decided to switch to Git Graph. Everything is perfect, but the diff viewer is unsuitable because of my old habit/preference. I knew Git Graph using default vscode diff, which might be great for most people but not for me.

Thus, I made a quick draft version to prove the concept of "better" diff, which utils the diff2HTML(https://diff2html.xyz/) project. So as you know, this is just a working prototype. (i.e. not suitable for merging). I want to get some ideas and see if it is worth continuing.

What I have done:

  • Click a file in Git Graph to see the "better" diff
  • Open diff viewer for all uncommitted changes (multiple files) - by running command of View Git Diff for Repo
  • Diff will be auto-refreshed when files get updated
  • Open a file from diff viewer
  • Revert a file from diff viewer

What I am hoping to do:

  • Do not overwrite existing functions ( I just did some dirty work to make it work)
  • Remove the need for jQuery
  • Be able to turn on/off in the settings
  • Remember status (e.g. tick viewed can be remembered)
  • Partial (e.g. select a few lines) revert from diff viewer (similar to SourceTree)

F.Y.I. I am not so used to npm, so please feel free to point out my bad practice.

Any suggestion is welcome.

image

Cheers,
Sam

@homsai homsai changed the title vscode git graph with better diff A better diff viewer - Diff2HTML support Feb 22, 2023
@TheBrenny
Copy link

I think this is excellent work! But I also think it's better off as an extension of its own, and maybe pushed toward the VSCode team.

@liveinaus
Copy link

I think this is excellent work! But I also think it's better off as an extension of its own, and maybe pushed toward the VSCode team.

Hey @TheBrenny,

Thanks for your suggestion. I have done the work as an extension of my own. The PR can be closed if anyone wants to do so.

F.Y.I. The goal is to create a Source Tree diff viewer in Vscode. The extension for viewing better Git diff is available at Better Diff Viewer

Cheers,
Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants