fixed support for git dir.