code: def _assert_git_repo(target):
          
          hooks_dir = os.path.abspath(os.path.join(target, HOOKS_DIR_PATH))
          if not os.path.isdir(hooks_dir):
              raise GitHookInstallerError(u"{0} is not a git repository.".format(target))
docs: Asserts that a given target directory is a git repository