[rtems-tools commit] rtemstoolkit/git: Ignore untracked files in the dirty state.
Chris Johns
chrisj at rtems.org
Tue Nov 27 02:55:44 UTC 2018
Module: rtems-tools
Branch: master
Commit: 29f9e10ed4c1650d7fdcab8e3fb24b2cbbf5a0d5
Changeset: http://git.rtems.org/rtems-tools/commit/?id=29f9e10ed4c1650d7fdcab8e3fb24b2cbbf5a0d5
Author: Chris Johns <chrisj at rtems.org>
Date: Mon Nov 26 11:51:22 2018 +1100
rtemstoolkit/git: Ignore untracked files in the dirty state.
---
rtemstoolkit/git.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rtemstoolkit/git.py b/rtemstoolkit/git.py
index e1dd029..b92391f 100644
--- a/rtemstoolkit/git.py
+++ b/rtemstoolkit/git.py
@@ -152,7 +152,10 @@ class repo:
def dirty(self):
_status = self.status()
- return not (len(_status) == 1 and 'branch' in _status)
+ status_keys = list(_status.keys())
+ if 'untracked' in status_keys:
+ status_keys.remove('untracked')
+ return not (len(status_keys) == 1 and 'branch' in _status)
def valid(self):
if path.exists(self.path):
More information about the vc
mailing list