[PATCH v2 rtems-tools 1/2] rt: Add diff method to git.py
Ida Delphine
idadelm at gmail.com
Thu Aug 26 08:22:39 UTC 2021
Signed-off-by: Ida Delphine <idadelm at gmail.com>
---
rtemstoolkit/git.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/rtemstoolkit/git.py b/rtemstoolkit/git.py
index f65300b..b544a9b 100644
--- a/rtemstoolkit/git.py
+++ b/rtemstoolkit/git.py
@@ -119,6 +119,10 @@ class repo:
args = [args]
ec, output = self._run(['clean'] + args, check = True)
+ def diff(self, args = []):
+ ec, output = self._run(['diff'] + args)
+ return output
+
def status(self):
_status = {}
if path.exists(self.path):
@@ -229,3 +233,4 @@ if __name__ == '__main__':
print('remotes:', g.remotes())
print('email:', g.email())
print('head:', g.head())
+ print('diff:', g.diff())
--
2.25.1
More information about the devel
mailing list