{"action":"created","issue":{"url":"https://api.github.com/repos/git-cola/git-cola/issues/546","labels_url":"https://api.github.com/repos/git-cola/git-cola/issues/546/labels{/name}","comments_url":"https://api.github.com/repos/git-cola/git-cola/issues/546/comments","events_url":"https://api.github.com/repos/git-cola/git-cola/issues/546/events","html_url":"https://github.com/git-cola/git-cola/pull/546","id":129073267,"number":546,"title":"fsmonitor: use the resolved git repository path","user":{"login":"davvid","id":13196,"avatar_url":"https://avatars.githubusercontent.com/u/13196?v=3","gravatar_id":"","url":"https://api.github.com/users/davvid","html_url":"https://github.com/davvid","followers_url":"https://api.github.com/users/davvid/followers","following_url":"https://api.github.com/users/davvid/following{/other_user}","gists_url":"https://api.github.com/users/davvid/gists{/gist_id}","starred_url":"https://api.github.com/users/davvid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davvid/subscriptions","organizations_url":"https://api.github.com/users/davvid/orgs","repos_url":"https://api.github.com/users/davvid/repos","events_url":"https://api.github.com/users/davvid/events{/privacy}","received_events_url":"https://api.github.com/users/davvid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T08:46:57Z","updated_at":"2016-01-27T14:28:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/git-cola/git-cola/pulls/546","html_url":"https://github.com/git-cola/git-cola/pull/546","diff_url":"https://github.com/git-cola/git-cola/pull/546.diff","patch_url":"https://github.com/git-cola/git-cola/pull/546.patch"},"body":"git_dir() is the worktree's .git path, but it is not necessarily\r\nthe path where refs/ objects/ and friends are found.  When using\r\nsubmodules, for example, .git is a file that contains the path\r\nto the actual git repository.\r\n\r\nThe fsmonitor registers the git path so that it can notice\r\nchanges.  When doing so it ignores ENOTDIR errors to avoid a\r\nrace condition, but it also silently ignores the request to\r\nwatch the .git-file.\r\n\r\nThis later causes an exception when asking for the git path:\r\n\r\n\tFile \"cola/fsmonitor.py\", line 207, in refresh\r\n\tself._git_dir_wd = self._git_dir_wd_map[self._git_dir]\r\n\tKeyError: u'/home/david/src/git/.git'\r\n\r\nFix the logic by using git_path() when setting up the monitor so\r\nthat the real git repository path is used.\r\n\r\nCloses #545\r\nReported-by: Wolfgang Ocker <weo@reccoware.de>\r\nSigned-off-by: David Aguilar <davvid@gmail.com>"},"comment":{"url":"https://api.github.com/repos/git-cola/git-cola/issues/comments/175655959","html_url":"https://github.com/git-cola/git-cola/pull/546#issuecomment-175655959","issue_url":"https://api.github.com/repos/git-cola/git-cola/issues/546","id":175655959,"user":{"login":"living180","id":425650,"avatar_url":"https://avatars.githubusercontent.com/u/425650?v=3","gravatar_id":"","url":"https://api.github.com/users/living180","html_url":"https://github.com/living180","followers_url":"https://api.github.com/users/living180/followers","following_url":"https://api.github.com/users/living180/following{/other_user}","gists_url":"https://api.github.com/users/living180/gists{/gist_id}","starred_url":"https://api.github.com/users/living180/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/living180/subscriptions","organizations_url":"https://api.github.com/users/living180/orgs","repos_url":"https://api.github.com/users/living180/repos","events_url":"https://api.github.com/users/living180/events{/privacy}","received_events_url":"https://api.github.com/users/living180/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T14:28:43Z","updated_at":"2016-01-27T14:28:43Z","body":"@davvid :+1: looks good to me."}}