{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/pygit2/issues/546","labels_url":"https://api.github.com/repos/libgit2/pygit2/issues/546/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/pygit2/issues/546/comments","events_url":"https://api.github.com/repos/libgit2/pygit2/issues/546/events","html_url":"https://github.com/libgit2/pygit2/issues/546","id":95396592,"number":546,"title":"Error in commiting submodules","user":{"login":"TDaglis","id":3427236,"avatar_url":"https://avatars.githubusercontent.com/u/3427236?v=3","gravatar_id":"","url":"https://api.github.com/users/TDaglis","html_url":"https://github.com/TDaglis","followers_url":"https://api.github.com/users/TDaglis/followers","following_url":"https://api.github.com/users/TDaglis/following{/other_user}","gists_url":"https://api.github.com/users/TDaglis/gists{/gist_id}","starred_url":"https://api.github.com/users/TDaglis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TDaglis/subscriptions","organizations_url":"https://api.github.com/users/TDaglis/orgs","repos_url":"https://api.github.com/users/TDaglis/repos","events_url":"https://api.github.com/users/TDaglis/events{/privacy}","received_events_url":"https://api.github.com/users/TDaglis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-16T09:50:23Z","updated_at":"2015-08-03T06:55:42Z","closed_at":null,"body":"Is there a way to add a submodule to the index in order to commit?\r\nAfter pulling the latest changes of my submodule, when I try to add to the index I get the following error.\r\n\r\n```\r\n>>> repository.index.add('mysubmodule')\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python2.7/dist-packages/pygit2/index.py\", line 205, in add\r\n    check_error(err, True)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pygit2/errors.py\", line 56, in check_error\r\n    raise GitError(message)\r\n_pygit2.GitError: Failed to read file into stream: Is a directory\r\n```\r\n\r\nIf working with submodules is not possible at the moment, would it be possible to somehow ignore submodule changes in `add_all` since it raises the same error and cannot be used anymore?\r\n```\r\n>>> repository.index.add_all()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python2.7/dist-packages/pygit2/index.py\", line 180, in add_all\r\n    check_error(err, True)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pygit2/errors.py\", line 56, in check_error\r\n    raise GitError(message)\r\n_pygit2.GitError: Failed to read file into stream: Is a directory\r\n```"},"comment":{"url":"https://api.github.com/repos/libgit2/pygit2/issues/comments/127143659","html_url":"https://github.com/libgit2/pygit2/issues/546#issuecomment-127143659","issue_url":"https://api.github.com/repos/libgit2/pygit2/issues/546","id":127143659,"user":{"login":"TDaglis","id":3427236,"avatar_url":"https://avatars.githubusercontent.com/u/3427236?v=3","gravatar_id":"","url":"https://api.github.com/users/TDaglis","html_url":"https://github.com/TDaglis","followers_url":"https://api.github.com/users/TDaglis/followers","following_url":"https://api.github.com/users/TDaglis/following{/other_user}","gists_url":"https://api.github.com/users/TDaglis/gists{/gist_id}","starred_url":"https://api.github.com/users/TDaglis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TDaglis/subscriptions","organizations_url":"https://api.github.com/users/TDaglis/orgs","repos_url":"https://api.github.com/users/TDaglis/repos","events_url":"https://api.github.com/users/TDaglis/events{/privacy}","received_events_url":"https://api.github.com/users/TDaglis/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T06:55:42Z","updated_at":"2015-08-03T06:55:42Z","body":"Thanks :+1: \r\nI'll check out the fix.\r\n"}}