[jhbuild] [git] Consider staged, uncommited changes as dirty



commit 4f026649ed00dbb51011d825e6efd7e89e9e936b
Author: Dirk Wallenstein <halsmit t-online de>
Date:   Sat May 22 19:44:46 2010 +0200

    [git] Consider staged, uncommited changes as dirty
    
    is_dirty made the wrong diff previously. This now considers any
    deviation between HEAD and the current working tree as dirty.

 jhbuild/versioncontrol/git.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index a738aa2..a0722ab 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -178,7 +178,8 @@ class GitBranch(Branch):
                         'to operate'))
             submodule_options = ['--ignore-submodules']
         return not self._execute_git_predicate(
-                ['git', 'diff', '--exit-code', '--quiet'] + submodule_options)
+                ['git', 'diff', '--exit-code', '--quiet'] + submodule_options
+                + ['HEAD'])
 
     def _check_version_git(self, version_spec):
         return check_version(['git', '--version'], r'git version ([\d.]+)',



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]