From: Paul M. B. <pm...@ny...> - 2008-07-31 20:51:42
|
Folks, I have added a very crude monitor thread which checks for changes to the .git environment. * It is clunky, and does not use much of the framework, as 2 days of work did not yield how to put it inside * So I run a thread every 5 seconds and check the timestamps of the .git/HEAD and .git/objects for changes ** This is b/c every time you run git-status, it modifies the .git/index file. (so simply checking for changes to .git/ does not work) * If I detect a change -- which will occur if you do a git operation both inside AND outside the framework -- I touch all of the project IResources and force a refresh. I wish I could touch fewer, but I am not aware of an easy way to detect what to touch. FYI - that touch is only to the eclipse IResource (not the File in the system). The refresh handles redecoration and the branch name on the project. * This works for both projects with .git in root and projects whose .git file is up some # of levels > 0 * currently, there is a thread for each project. That could get ugly if a user had hundreds of projects open, but I am trying to do the simplest thing that works correctly for Tuesday's alpha. I have added a code-review Gitclipse-15 -Paul |