diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-07-06 15:55:19 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-11-14 14:22:10 +0200 |
commit | 91fcf2c70878e5d7966f4c927ea1922c68262e7c (patch) | |
tree | 1ffec82200b5a33496bff61c80c911721d6820f8 /tests | |
parent | 46ba58673c35a319ff6cdcfb65442b6722017787 (diff) | |
download | git-buildpackage-91fcf2c70878e5d7966f4c927ea1922c68262e7c.tar.gz git-buildpackage-91fcf2c70878e5d7966f4c927ea1922c68262e7c.tar.bz2 git-buildpackage-91fcf2c70878e5d7966f4c927ea1922c68262e7c.zip |
GitRepository/add_files: add new option 'untracked'
With this option you can either only update already tracked files to
index the (untracked=False) or add new files, too.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_GitRepository.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index f3a83ff3..b1a14326 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -68,6 +68,7 @@ def test_add_files(): - L{gbp.git.GitRepository.add_files} - L{gbp.git.GitRepository.commit_all} - L{gbp.git.GitRepository.is_clean} + - L{gbp.git.GitRepository.status} Properties tested: - L{gbp.git.GitRepository.head} @@ -80,7 +81,12 @@ def test_add_files(): False >>> repo.is_clean(ignore_untracked=True)[0] True + >>> repo.add_files('testfile', force=True, untracked=False) + >>> repo.status().items() + [('??', ['testfile'])] >>> repo.add_files(repo.path, force=True) + >>> repo.status().items() + [('A ', ['testfile'])] >>> repo.commit_all(msg="foo") >>> repo.is_clean()[0] True |