You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a worktree, ".git" is not a directory but a file. This causes an exception in the file monitor module because _refresh_watches() collects only directories.
Traceback (most recent call last):
File "/opt/git-cola/share/git-cola/lib/cola/fsmonitor.py", line 152, in run
self.refresh()
File "/opt/git-cola/share/git-cola/lib/cola/fsmonitor.py", line 207, in refresh
self._git_dir_wd = self._git_dir_wd_map[self._git_dir]
KeyError: u'/home/weo/Projects/MyProject/.git'
The text was updated successfully, but these errors were encountered:
davvid
added a commit
to davvid/git-cola
that referenced
this issue
Jan 27, 2016
git_dir() is the worktree's .git path, but it is not necessarily
the path where refs/ objects/ and friends are found. When using
submodules, for example, .git is a file that contains the path
to the actual git repository.
The fsmonitor registers the git path so that it can notice
changes. When doing so it ignores ENOTDIR errors to avoid a
race condition, but it also silently ignores the request to
watch the .git-file.
This later causes an exception when asking for the git path:
File "cola/fsmonitor.py", line 207, in refresh
self._git_dir_wd = self._git_dir_wd_map[self._git_dir]
KeyError: u'/home/david/src/git/.git'
Fix the logic by using git_path() when setting up the monitor so
that the real git repository path is used.
Closesgit-cola#545
Reported-by: Wolfgang Ocker <weo@reccoware.de>
Signed-off-by: David Aguilar <davvid@gmail.com>
In a worktree, ".git" is not a directory but a file. This causes an exception in the file monitor module because _refresh_watches() collects only directories.
Traceback (most recent call last):
File "/opt/git-cola/share/git-cola/lib/cola/fsmonitor.py", line 152, in run
self.refresh()
File "/opt/git-cola/share/git-cola/lib/cola/fsmonitor.py", line 207, in refresh
self._git_dir_wd = self._git_dir_wd_map[self._git_dir]
KeyError: u'/home/weo/Projects/MyProject/.git'
The text was updated successfully, but these errors were encountered: