@@ -0,0 +1,739 @@
+from git import Repo%0Aimport logging%0Aimport os%0A%0Alog = logging.getLogger('git-vendor.helpers')%0A%0A%0Adef repository_sanity(directory):%0A    %22%22%22 repository_sanity: predicate method for checking the status of a dirty'%0A    repository%22%22%22%0A%0A    repo = Repo(directory)%0A    if repo.is_dirty():%0A        log.warn('Repository is dirty, doing nothing')%0A        return False%0A    return True%0A%0A%0Adef is_path_sane(directory='.'):%0A    %22%22%22 is_path_sane: predicate method for checking if we're pointed at a git%0A    repository%22%22%22%0A%0A    if os.path.exists('.vendor-rc'):%0A        log.warn('Config exists, doing nothing')%0A        return False%0A%0A    if not os.path.exists('.git'):%0A        log.warn('Not a git repository, doing nothing')%0A        return False%0A    return True%0A

Add helpers module