{"thread":{"id":"12987","subject":"git add after changing a submodule","startedAt":"2008-04-04T20:50:48Z","lastAt":"2008-04-04T20:50:48Z","messageCount":1,"participants":["Pat Maddox"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"73666","messageId":"810a540e0804041350u7fe4a5c4t7e86274e188e3e91@mail.gmail.com","threadId":"12987","inReplyTo":null,"subject":"git add after changing a submodule","fromName":"Pat Maddox","fromEmail":"pergesu@gmail.com","sentAt":"2008-04-04T20:50:48Z","receivedAt":"2008-04-04T20:50:48Z","isPatch":false,"sender":{"key":"pergesu@gmail.com","avatar":null},"body":"If I make a change to a submodule and commit it, I then have to add it\nto the parent repo.  If I do\n\ngit add path/to/submodule\n\nthen it works fine.  But if I do\n\ngit add path/to/submodule/ (with trailing slash)\n\nthen it blows away the submodule and adds all the files in that directory.\n\nSeems pretty dangerous to me.  I know that I can just use git commit\n-a to do it, but I'd like to prevent the mistake of adding the path\nand screwing up the repo.  Is it possible to protect the submodules a\nbit more?\n\nPat\n"}]}