You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had problems importing multiple files. It looked like the files are imported ok. But running "nb git log" I could see that some imports was not commited. "nb git status" lists them as untracked.
It's my git config that doesn't let me add files with CRLF line terminators so nb fails to add them to the index.
Since the repo is now out of sync with the files on disk, when I try to delete one of them I get an error:
fatal: pathspec '/Users/jorgen/.nb/home/somefile.org' did not match any files
The workaround of course is to fix my files so that git will accept them, but it would also be nice if nb would tell you that something went wrong.
How to reproduce:
$ git config --global core.safecrlf true
<create file with CRLF>
$ nb import <file>
<file is imported fine>
$ nb delete <id> // will be an error
$ nb git status // the file will be listed as untracked
The text was updated successfully, but these errors were encountered:
Currently the git operations are handled in the background after the item is added to the .index. Checking for git errors seems like it would require revering that order of operations and waiting for the git operations to finish. It might be better to allow them in the .index and ignore the git error during operations like delete, though this would result in clones having entries in .index that reference files that aren't in the repo.
I'll have to think more about how to handle these files.
I had problems importing multiple files. It looked like the files are imported ok. But running "nb git log" I could see that some imports was not commited. "nb git status" lists them as untracked.
It's my git config that doesn't let me add files with CRLF line terminators so nb fails to add them to the index.
Since the repo is now out of sync with the files on disk, when I try to delete one of them I get an error:
fatal: pathspec '/Users/jorgen/.nb/home/somefile.org' did not match any files
The workaround of course is to fix my files so that git will accept them, but it would also be nice if nb would tell you that something went wrong.
How to reproduce:
The text was updated successfully, but these errors were encountered: