diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-09-17 14:47:21 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-06-05 14:20:03 +0300 |
commit | 144b034ee8a1d300ca99826094e5060dc2288809 (patch) | |
tree | bf4a960ea5fcfc51d91442fe6334b5743cbae3d2 /gbp/git | |
parent | 25f9da0715500858c62389de76fe9d1e07e3dc3a (diff) | |
download | git-buildpackage-144b034ee8a1d300ca99826094e5060dc2288809.tar.gz git-buildpackage-144b034ee8a1d300ca99826094e5060dc2288809.tar.bz2 git-buildpackage-144b034ee8a1d300ca99826094e5060dc2288809.zip |
GitRepository.archive: add 'paths' option
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 760f891e..1b696406 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1736,7 +1736,7 @@ class GitRepository(object): return output #} - def archive(self, format, prefix, output, treeish): + def archive(self, format, prefix, output, treeish, paths=None): """ Create an archive from a treeish @@ -1749,6 +1749,8 @@ class GitRepository(object): @type output: C{str} or C{None} @param treeish: the treeish to create the archive from @type treeish: C{str} + @param paths: List of paths to include in the archive + @type paths: C{list} of C{str} @return: archive data as a generator object @rtype: C{None} or C{generator} of C{str} @@ -1756,6 +1758,8 @@ class GitRepository(object): args = GitArgs('--format=%s' % format, '--prefix=%s' % prefix) args.add_true(output, '--output=%s' % output) args.add(treeish) + args.add("--") + args.add_cond(paths, paths) if output: out, err, ret = self._git_inout('archive', args.args) |