never check for dirty files with -f
authorAdrian Bunk <adrian.bunk@movial.com>
Wed, 10 Mar 2010 11:28:23 +0000 (13:28 +0200)
committerKalle Vahlman <kalle.vahlman@movial.com>
Wed, 10 Mar 2010 17:29:15 +0000 (19:29 +0200)
matrix/matrix.py
matrix/repositories.py

index 26641d5..370d208 100644 (file)
@@ -277,8 +277,7 @@ def clean(targets):
                c.source.clean()
                cache.remove(c)
 
-               if not config.force:
-                       changed = check_dirty(c)
+               changed = check_dirty(c)
 
        if changed:
                raise Error()
@@ -329,7 +328,7 @@ def changes(targets):
                if check_changes(c.meta):
                        changed = True
 
-               if not config.force and check_dirty(c):
+               if check_dirty(c):
                        changed = True
 
        if not changed:
index da2abe1..01c8aa5 100644 (file)
@@ -196,6 +196,8 @@ class Repository(object):
                return git.ls_files(self.path, ['-o'], exclude=self.exclude)
 
        def is_dirty(self):
+               if config.force:
+                       return False
                return git.any_files(self.path, ['-m', '-d'],
                                     exclude=self.exclude)