diff --git a/git.py b/git.py index b67c43e97875b99727453e94851ddc3d7fb80706..19f3c1119c9b6906b47b6da8e372bbccc6865e94 100644 --- a/git.py +++ b/git.py @@ -26,6 +26,8 @@ def check_status(): def is_git_dirty(): repos = local('find ' + path.normpath(env.workspace) + ' -name ".git"', capture=True).splitlines() + repos = _remove_untouched_repository(repos) + nbWarnings = 0 for repo in repos: repoLocalPath = path.normpath(path.join(repo, '..')) @@ -42,6 +44,13 @@ def is_git_dirty(): # - attention aux conflits, faire un pull d'abord et valider la fusion automatique +def _remove_untouched_repository(repos): + repos.remove(path.normpath(path.join(env.workspace, '.git'))) + repos.remove(path.normpath(path.join(env.workspace, 'fabfile', '.git'))) + + return repos + + def _check_repo(repoLocalPath): nbWarnings = 0 with h.fab_cd('local', repoLocalPath):