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
NBDime REST API changes for git diffs #480
Comments
Note: For alternative 1. there is some work already in a branch on my repo (master...vidartf:jlgit). Although it would probably be better to not use the prefix method, if it can be avoided. For alternative 2, I'd appreciate thoughts on pros/cons of putting this in nbdime, vs implementing this somewhere else (e.g. jupyterlab-git). |
I agree - If we go along this route, we'll update the API to have explicit fields for git refs
Good point. One consideration on option 2 is where it is implemented. Pro of implementing this in the Git extension:
Con of implementing this in the Git extension:
I don't think either option is bad, I'm fine to start with one and contribute whatever makes sense back to nbdime. |
My current thoughts (open to good arguments though):
Note: It sounds a little counter-intuitive to me to have a notebook-only directory diffing solution, but there might be something I'm missing. |
Fixed by #482. |
Hi @vidartf and others,
I'm touching base on the work proposed to add visual diff in the Git extension in jupyterlab/jupyterlab-git#331
Current world
The nbdime REST API (
/nbdime/api/diff
) provides diff for at a file levelgit:$FILE_NAME
and that computes the diff between version of the file in the Git working directory and HEADProposed changes
To support diffs across the Git workflow, the proposal was to enhance this API to allow diff'ing between multiple points such as between two arbitrary git refs(equivalant of
git diff $OLD_COMMIT $NEW_COMMIT
or Diffing the changes in the staging area (equivalent ofgit diff --staged
)There are two ways to go about this
Add fields to the existing diff API that allow this functionality
Add a specific APIs for Git diffs that provide diff for all files based on the Git context passed
Both will work but I wanted to gather any feedback before embarking on this work.
The text was updated successfully, but these errors were encountered: