{"issue":{"created_at":"2011-12-14T18:46:29Z","state":"open","updated_at":"2011-12-14T21:15:40Z","user":{"gravatar_id":"d27120714a64642bfae99dbd93515a82","id":213274,"url":"https://api.github.com/users/ianhinder","login":"ianhinder","avatar_url":"https://secure.gravatar.com/avatar/d27120714a64642bfae99dbd93515a82?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"If I remove submodules from .gitmodules and then do a git module sync, I cannot commit the result:\r\n\r\nvpn-external-022:Kerrness (master) $ git status\r\n# On branch master\r\n# Changes to be committed:\r\n#   (use \"git reset HEAD <file>...\" to unstage)\r\n#\r\n#\tmodified:   .gitmodules\r\n#\tdeleted:    arrangements/AEIDevelopment/IsolatedHorizon\r\n\r\nvpn-external-022:Kerrness (master) $ git commit .gitmodules arrangements repos\r\nerror: unable to index file arrangements/AEIDevelopment/IsolatedHorizon\r\nfatal: updating files failed\r\n\r\n\r\nvpn-external-022:Kerrness (master) $ rmdir arrangements/AEIDevelopment/IsolatedHorizon\r\nvpn-external-022:Kerrness (master) $ git commit .gitmodules arrangements repos\r\nerror: unable to index file arrangements/CactusTest/TestArrays\r\nfatal: updating files failed\r\n\r\nso it looks like a good idea for git module sync to also remove the directories (they are empty, because I never \"update\"d them).","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2556233,"number":6,"labels":[],"title":"git-module sync does not fully remove submodules","html_url":"https://github.com/barrywardell/git-module/issues/6","closed_at":null,"url":"https://api.github.com/repos/barrywardell/git-module/issues/6","milestone":null},"action":"created","comment":{"created_at":"2011-12-14T21:15:40Z","updated_at":"2011-12-14T21:15:40Z","user":{"gravatar_id":"b309172f8f2dc45a481c5d7c85933adf","id":354095,"url":"https://api.github.com/users/barrywardell","login":"barrywardell","avatar_url":"https://secure.gravatar.com/avatar/b309172f8f2dc45a481c5d7c85933adf?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Right now, 'git module sync' does the same as 'git module rm' for all removed submodules. This removes the directory from the index using the --cached option so that the directory is not actually deleted.\r\n\r\nNote also that the .gitmodules file and removed directory are also staged so you should be able to commit without specifying the paths explicitly. Does it work for you if you do this?","id":3149955,"url":"https://api.github.com/repos/barrywardell/git-module/issues/comments/3149955"}}