facultyai / faculty-sync

Synchronise a local directory with your Faculty platform workspace
https://pypi.org/project/faculty_sync/
Apache License 2.0
10 stars 1 forks source link

Sync will not delete folder containing git repository #26

Open tcbegley opened 6 years ago

tcbegley commented 6 years ago

I was using sml-sync on a project with multiple Git repositories. I deleted a folder containing one such repository and synced up. Now however I see this

image

And it persists no matter how many times I press [u]. I don't know what the best way to handle this is, I appreciate that deleting a Git repository is potentially dangerous, but perhaps there would be a better way of communicating to the user why the remote folder isn't getting deleted?

janfreyberg commented 6 years ago

@liamcoatman just pointed out that this is true for all files that are set as "ignored", e.g. __pycache__.

I think this should be the behaviour (in case there's a .git repo as in @tcbegley's case, or if there are notebooks or data files in a directory), but it should be communicated why the folders didn't get deleted (if that's possible).

janfreyberg commented 6 years ago

One good idea by @tcbegley is to completely ignore directories that are empty (or perceived to be empty due to ignored files), similar to how git works