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> | 2012-08-10 11:35:11 +0300 |
commit | a57060c5f8277af6d0e65b1aec3ee626c633ad5e (patch) | |
tree | cef7413c0a1982be991de6bf5b2c9ef1a3bfd9d6 /tests | |
parent | c7976f886eec959f6aec30e1c3a9063e3c0c3d5a (diff) | |
download | git-buildpackage-a57060c5f8277af6d0e65b1aec3ee626c633ad5e.tar.gz git-buildpackage-a57060c5f8277af6d0e65b1aec3ee626c633ad5e.tar.bz2 git-buildpackage-a57060c5f8277af6d0e65b1aec3ee626c633ad5e.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 6258dd49..5a97d314 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -69,6 +69,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} @@ -81,7 +82,12 @@ def test_add_files(): False >>> repo.is_clean(ignore_untracked=True)[0] True + >>> repo.add_files(repo.path, 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 |