diff options
author | Andrej Shadura <andrew.shadura@collabora.co.uk> | 2021-02-07 13:16:00 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2021-03-11 12:48:47 +0100 |
commit | 3fa9f4d35c38fcf0fdd387e6e0a0199a14a5160e (patch) | |
tree | a308db8778546c919042bb554054815cf2c07d0e /tests/doctests/test_GitRepository.py | |
parent | b17c14ae91b5f68e1b0f0c80c256ce984036299c (diff) |
gbp.git: Add support for long listing format (with object sizes)
This is useful to be able to scan a tree for a specific file
but only act if it’s non-empty.
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Diffstat (limited to 'tests/doctests/test_GitRepository.py')
-rw-r--r-- | tests/doctests/test_GitRepository.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/doctests/test_GitRepository.py b/tests/doctests/test_GitRepository.py index 98fede04..5b3c8f4e 100644 --- a/tests/doctests/test_GitRepository.py +++ b/tests/doctests/test_GitRepository.py @@ -951,6 +951,8 @@ def test_make_tree(): '745951810c9e22fcc6de9b23f05efd6ab5512123' >>> list(repo.list_tree(newtree, recurse=False, paths='testfile')) [('100644', 'blob', '19af7398c894bc5e86e17259317e4db519e9241f', b'testfile')] + >>> list(repo.list_tree(newtree, recurse=False, paths='testfile', sizes=True)) + [('100644', 'blob', '19af7398c894bc5e86e17259317e4db519e9241f', 20, b'testfile')] >>> repo.make_tree([]) '4b825dc642cb6eb9a060e54bf8d69288fbee4904' """ |