-
Notifications
You must be signed in to change notification settings - Fork 95
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
Windows newlines in diff --cached after git add with nbstripout #110
Comments
Can you please confirm your platform, Python and nbstripout version? |
I'm sorry but I've been working in a setup where I wanted to commit the cell outputs together with the notebooks recently. In the next few days I'll set up nbstripout again and try to reproduce this. |
Windows10 == 1809
|
What is your Git config setting for |
|
I don't have access to a Windows system to reproduce this and I don't have a good idea what might cause this behaviour and if it's working as intended or not. Does |
@amard33p any update on this? |
@kynan Yes, I think the problem was solved. |
I installed
nbstripout
without arguments (locally) in the repository.Then I added a "dirty" notebook, say with
git add myNb.ipynb
.Ok, doing a check with
git diff --cached
- I don't see outputs or metadata (OK!), but all the inserted lines have a "^M" (carriage return) in the diff view.I ran
nbstripout myNb.ipynb
and git status showed no changes. Even so, I re-rangit add myNb.ipynb
and thengit diff --cached
showed a lot of newlines.I also have
nbdime
installed, so I saw that the[diff ipynb]
(or sth like that) section in.git/config
and deleted it. The ugly JSON diffs with ^M disappeared, and the structured nbdime diff shows no appended newlines (but - it may actually mask the problem).I can't be sure what is at fault here:
I'd like to know, if this is a false alarm, or actual whitespace pollution to the repository.
The text was updated successfully, but these errors were encountered: