Since this is a hook script , it will probably use POSIX paths in a bash session, not Windows paths.
git log --name-status --git-dir='/C/Documents and Settings/user/My Documents/Visual Studio 2008/Projects/CMS/.git' --work-tree='/C/Documents and Settings/user/My Documents/Visual Studio 2008/Projects/CMS'
From a DOS session (as in the non-hook case), the path might look like this:
git log --name-status --git-dir='C:/Documents and Settings/user/My Documents/Visual Studio 2008/Projects/CMS/.git' --work-tree='C:/Documents and Settings/user/My Documents/Visual Studio 2008/Projects/CMS'
Alternative syntax (not tested): "c:\\xxx\\yyy\\..."
source share