Directories that are renamed/moved persist

Issue #11 resolved
Luke Spragg created an issue

This is one little annoyance I've had, where if you rename a directory (and maybe deleting one even), it doesn't seem to delete the old (at least from what I've noticed).

Example Scenario: Renamed a directory from bob to bobby, committed the change, commit is synced to the server, server creates bob directory and files, bobby directory and files remain when they should be deleted.

Comments (3)

  1. Alexandru Lixandru repo owner

    Actually, the files from within the old directory are deleted, but the (empty) directory itself remains. The thing is, git does not track directories, but only files within them. So it is not possible in git to reliably know when an entire directory is renamed (as opposed to when a file is moved to another directory). What the script could do is check if the old directory is empty after processing all files, and in case it is, then just delete it. I'll be looking into the implications of this.

  2. Alexandru Lixandru repo owner

    Should be done now with the latest commit. Empty folders resulted from files which were removed/renamed will also be deleted after all commits are processed.

  3. Log in to comment