-
Notifications
You must be signed in to change notification settings - Fork 391
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
Error: the git index is outdated for pre-commit with new file and pure VSCode #967
Comments
Note I'm using this |
Furthermore, jupytext also deletes all notebook cells outputs! Even from file that already synced with jupytext from jupyterlab, that already tracked by git for a long time. I;m trying to add jupytext pre-commit hook in an already estabilished repository. Previously, I'm relying on
|
Hi @yasirroni , thank you for reporting this. This is very interesting. I have been able to reproduce what you describe in a test (first commit of main...reproduce_967). A workaround is to restrict the hook to I suspect this reveals another undesirable behavior #969 - I'll confirm and see what I can do about that. |
The root issue for this problem was #969, it has been addressed in |
It works! |
Anyway, my workflow consisting of I've read Does running |
Use case:
I'm trying pre-commit hook on jupytext. The config is like this:
With no pyproject.toml just yet.
Adding new notebook from VSCode, did not use jupyter nor jupyterlab (only jupyter from VSCode to do edits, it throws error:
[jupytext] Error: the git index is outdated.
Please add the paired notebook with:
git add notebooks/test.ipynb
[jupytext] Updating the timestamp of notebooks/test.py
Run
git add notebooks/test.ipynb
did not fix. Anyway, files are already staged anyway.Further investigating, for each push, the pre-commit hook update cell
id
in metadata:Both pre-commit and pip use
jupytext-1.13.8
The text was updated successfully, but these errors were encountered: