Hello,
We are having an issues with diffing both notebook and python files if there is a Merge Conflict.
Reproduce (notebook)
You need to create a Merge conflict situation (i.e two guys changing a one file)
Commit, and then try to pull.
You'll get a Pull error message.
Click on Diff on the file in Staged section:
This is what you'll get in UI:
And error in the logs:
Unreadable Notebook: /home/kflovian/scripts/tm/yq-tutorials/Tutorial_template.ipynb NotJSONError('Notebook does not appear to be JSON: \'{\n "cells": [\n {\n "cell_type": "m...')
If you open this notebook in Editor, there will be git merge symbols (>>>>>> and <<<<<<)
Reproduce (python file)
There is a different error pops up on Python file merge conflicts.
If you repeat a steps above on Python file and click on Diff on Staged section, you'll get an error:
[W 2021-03-10 14:41:53.827 ServerApp] 500 POST /notebook/bohdana/nohybrid2/git/diffcontent?1615383700875 (127.0.0.1): Error [fatal: Path 'file.py' is in the index, but not at stage 0.
Did you mean ':1:file.py'?
] occurred while executing [git show :file.py] command to retrieve plaintext diff.
[W 2021-03-10 14:41:53.828 ServerApp] Error [fatal: Path 'file.py' is in the index, but not at stage 0.
Did you mean ':1:file.py'?
] occurred while executing [git show :file.py] command to retrieve plaintext diff.
If I execute git show :1:file.py in the terminal, it works.
Expected behavior
Git diff works.
Context
Python package version:
Version: 0.30.0b2
Extension version:
JupyterLab v3.0.10
/opt/conda/share/jupyter/labextensions
jupyterlab-s3-browser v0.9.0 enabled OK (python, jupyterlab_s3_browser)
@jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
@jupyterlab/git v0.30.0-beta.2 enabled OK (python, jupyterlab-git)
Other labextensions (built into JupyterLab)
app dir: /opt/conda/share/jupyter/lab
@krassowski/jupyterlab-lsp v3.4.1 enabled OK
nbdime-jupyterlab v2.1.0-beta.1 enabled OK
- Git version:
git version 2.25.1
- Operating System and its version: Docker image
Description
Hello, We are having an issues with diffing both notebook and python files if there is a Merge Conflict.
Reproduce (notebook)
Diff
on the file inStaged
section:If you open this notebook in Editor, there will be git merge symbols (>>>>>> and <<<<<<)
Reproduce (python file)
There is a different error pops up on Python file merge conflicts. If you repeat a steps above on Python file and click on Diff on
Staged
section, you'll get an error:If I execute
git show :1:file.py
in the terminal, it works.Expected behavior
Git diff works.
Context
Other labextensions (built into JupyterLab) app dir: /opt/conda/share/jupyter/lab @krassowski/jupyterlab-lsp v3.4.1 enabled OK nbdime-jupyterlab v2.1.0-beta.1 enabled OK