diff options
-rw-r--r-- | doc/source/changes.rst | 1 | ||||
-rw-r--r-- | git/repo/base.py | 11 | ||||
-rw-r--r-- | git/test/test_repo.py | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/doc/source/changes.rst b/doc/source/changes.rst index e18b07ce..d81f90a6 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -5,6 +5,7 @@ Changelog 0.3.6 - Features ================ * Added `Repo.merge_base()` implementation. See the `respective issue on github <https://github.com/gitpython-developers/GitPython/issues/169>`_ +* `[include]` sections in git configuration files are now respected * A list of all issues can be found here: https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.6+-+Features%22+ 0.3.5 - Bugfixes diff --git a/git/repo/base.py b/git/repo/base.py index 155a674f..afff9471 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -846,7 +846,10 @@ class Repo(object): :parm kwargs: Additional arguments passed to git-archive NOTE: Use the 'format' argument to define the kind of format. Use - specialized ostreams to write any format supported by python + specialized ostreams to write any format supported by python. + + You may specify the special 'path' keyword, which may either be a repository-relative + path to a directory or file to place into the archive, or a list or tuple of multipe paths. :raise GitCommandError: in case something went wrong :return: self""" @@ -855,8 +858,12 @@ class Repo(object): if prefix and 'prefix' not in kwargs: kwargs['prefix'] = prefix kwargs['output_stream'] = ostream + path = kwargs.pop('path', list()) + if not isinstance(path, (tuple, list)): + path = [path] + # end assure paths is list - self.git.archive(treeish, **kwargs) + self.git.archive(treeish, *path, **kwargs) return self rev_parse = rev_parse diff --git a/git/test/test_repo.py b/git/test/test_repo.py index a782cefa..226c1d26 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -266,7 +266,7 @@ class TestRepo(TestBase): def test_archive(self): tmpfile = tempfile.mktemp(suffix='archive-test') stream = open(tmpfile, 'wb') - self.rorepo.archive(stream, '0.1.5') + self.rorepo.archive(stream, '0.1.6', path='doc') assert stream.tell() stream.close() os.remove(tmpfile) |