From 2aba55d554233f84a25a9ae924e4f7725ad25000 Mon Sep 17 00:00:00 2001 From: Samuel Sirois Date: Mon, 14 Nov 2016 14:00:29 -0500 Subject: [PATCH] Remove untouched repositories from git.check_status to reduce noise Fix Redmine#102624 --- git.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/git.py b/git.py index b67c43e..19f3c11 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): -- GitLab