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

Fix text diff for 1st commit and deleted files #766

Merged
merged 3 commits into from
Sep 8, 2020

Conversation

fcollonval
Copy link
Member

This fixes the display of text diff in history for two cases:

  • First commit (no previous commit)
  • Commit at which the file is deleted

@ianhi
Copy link
Collaborator

ianhi commented Sep 6, 2020

Nice!

One note: I think this is still missing one case with deleted files. It works as I'd expected from the history panel, but if you try to get the diff of the file from the commit panel you will get an error
diff-of-deleted

@fcollonval
Copy link
Member Author

Good catch @ianhi. I will extend this PR to cover that case.

Thank for reviewing

@fcollonval
Copy link
Member Author

I added the versioned file being deleted case

Copy link
Collaborator

@ianhi ianhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great thanks!

@ianhi ianhi merged commit 09bf406 into jupyterlab:master Sep 8, 2020
@fcollonval fcollonval deleted the fix/text-diff branch September 8, 2020 19:55
@fcollonval
Copy link
Member Author

@meeseeksdev backport to 0.11.x

@lumberbot-app
Copy link

lumberbot-app bot commented Oct 4, 2020

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout 0.11.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 09bf40630d9bfb26662d5e83619b2bfce5f57131
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #766: Fix text diff for 1st commit and deleted files'
  1. Push to a named branch :
git push YOURFORK 0.11.x:auto-backport-of-pr-766-on-0.11.x
  1. Create a PR against branch 0.11.x, I would have named this PR:

"Backport PR #766 on branch 0.11.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

fcollonval pushed a commit that referenced this pull request Oct 4, 2020
Fix text diff for 1st commit and deleted files
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.

2 participants