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

commit does not work properly in certain situation: 'expected regular file' #157

Open
thorstenwagner opened this issue Aug 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@thorstenwagner
Copy link

Hi,

assume you have a file A.txt in your repo and you want to update it.

First of all let me explain what works:

  1. delete A.txt
  2. replace it with the new A.txt
  3. dud commit; dud push etc

Now let me tell you when it fails:

  1. Delete A.txt
  2. Create the new file A.txt with a jupyter-notebook
  3. dud commit throws an error during commit command
.ipynb_checkpoints/coords_to_gt_2-checkpoint.ipynb: expected regular file, got link

Howeever, it created a link for A.txt
4. rm -rf .ipynb_checkpoints (because that shouldnt be commited and is unwanted)
5. dud commit now also throws errors for A.txt

A.txt: expected regular file, got link

Bug? :-)

@thorstenwagner thorstenwagner added the bug Something isn't working label Aug 18, 2023
@kevin-hanselman
Copy link
Owner

Hi @thorstenwagner! Yes, this is a bug. I'm fairly sure the issue is that A.txt gets committed (and replaced with a link), but the commit fails due to something related to your .ipynb_checkpoints directory, so the stage file isn't written. When you attempt the second commit, Dud doesn't know that A.txt has been committed, sees it's a link, and complains.

Without a reproducible example, I can't be sure why the first commit is failing (on the .ipynb_checkpoints directory). If you can create a minimally reproducible example, that would be a big help.

The easiest way to start solving this issue would be to save the partially committed stage file when a failure occurs. I'll start looking into this.

This also brings up another issue that probably should be addressed sooner rather than later: adding a .dudignore file (#23)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants